From b4eafb9fbd4eb4acaac7480d9a06a92b2ee71f56 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Mon, 23 Aug 2021 19:53:52 +0200 Subject: [PATCH] Add xiaomi cloud extractor --- configuration/configuration.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configuration/configuration.yaml b/configuration/configuration.yaml index e513aad..68da00f 100644 --- a/configuration/configuration.yaml +++ b/configuration/configuration.yaml @@ -55,6 +55,14 @@ zoneminder: path: /zm/ camera: - platform: zoneminder + - platform: xiaomi_cloud_map_extractor + host: 192.168.60.7 + token: !secret xiaomi_vacuum_token + username: xiaomi@nerull7.info + password: !secret xiaomi_cloud_password + draw: [ 'all' ] + attributes: + - calibration_points influxdb: host: 192.168.50.100 @@ -568,5 +576,16 @@ template: device_class: energy state: > {{ states('sensor.washing_machine_energy_total') }} + attributes: + last_reset: '1970-01-01T00:00:00+00:00' + - name: "all_kWh" + unit_of_measurement: "kWh" + state_class: measurement + device_class: energy + state: > + {% set power = 0 %} + {% set power = power + states('sensor.3d_printer_kWh') | float %} + {% set power = power + states('sensor.washing_machine_kWh') | float %} + {{ power }} attributes: last_reset: '1970-01-01T00:00:00+00:00' \ No newline at end of file