From e641a8b30a377e37bd8d5c0cf493b151538cdd4e Mon Sep 17 00:00:00 2001 From: Florian Brinker Date: Tue, 29 Oct 2019 19:54:18 +0100 Subject: [PATCH] Change hygrometer to statestream mqtt sensors --- lovelace-views/devices.yaml | 12 ++++++++++++ lovelace-views/humidity.yaml | 12 ++++++------ lovelace-views/overview.yaml | 14 +++++++++++++- sensors/mqtt.yaml | 36 ++++++++++++++++++++++++++++++++++-- 4 files changed, 65 insertions(+), 9 deletions(-) diff --git a/lovelace-views/devices.yaml b/lovelace-views/devices.yaml index 27b7629..f06bdd5 100644 --- a/lovelace-views/devices.yaml +++ b/lovelace-views/devices.yaml @@ -42,3 +42,15 @@ cards: - entity: switch.wallboard_display name: Display icon: mdi:tablet + - type: entities + title: Home Assistant Slaves + show_header_toggle: false + entities: + - type: weblink + name: Livingroom + url: !secret url_haslave_livingroom + icon: mdi:home-assistant + - type: weblink + name: Office + url: !secret url_haslave_office + icon: mdi:home-assistant \ No newline at end of file diff --git a/lovelace-views/humidity.yaml b/lovelace-views/humidity.yaml index 5afe270..f3a4202 100644 --- a/lovelace-views/humidity.yaml +++ b/lovelace-views/humidity.yaml @@ -8,14 +8,14 @@ cards: - type: horizontal-stack cards: - type: sensor - entity: sensor.parents_bathroom_hygrometer_humidity + entity: sensor.hygro_bathroom_parents_humidity name: Luftfeuchtigkeit graph: line unit: "%" detail: 2 hours_to_show: 12 - type: sensor - entity: sensor.parents_bathroom_hygrometer_temperature + entity: sensor.hygro_bathroom_parents_temperature name: Temperatur graph: line unit: °C @@ -26,14 +26,14 @@ cards: - type: horizontal-stack cards: - type: sensor - entity: sensor.kids_bathroom_hygrometer_humidity + entity: sensor.hygro_bathroom_kids_humidity name: Luftfeuchtigkeit graph: line unit: "%" detail: 2 hours_to_show: 12 - type: sensor - entity: sensor.kids_bathroom_hygrometer_temperature + entity: sensor.hygro_bathroom_kids_temperature name: Temperatur graph: line unit: °C @@ -100,14 +100,14 @@ cards: - type: horizontal-stack cards: - type: sensor - entity: sensor.hwr_hygrometer_humidity + entity: sensor.hygro_hwr_humidity name: Luftfeuchtigkeit graph: line unit: "%" detail: 2 hours_to_show: 12 - type: sensor - entity: sensor.hwr_hygrometer_temperature + entity: sensor.hygro_hwr_temperature name: Temperatur graph: line unit: °C diff --git a/lovelace-views/overview.yaml b/lovelace-views/overview.yaml index 83b6807..8b2929d 100644 --- a/lovelace-views/overview.yaml +++ b/lovelace-views/overview.yaml @@ -1,6 +1,18 @@ title: Übersicht path: overview cards: + - type: conditional + conditions: + - entity: binary_sensor.openclose_10 + state: "on" + card: + type: entities + title: Offene Fenster + show_header_toggle: false + entities: + - entity: binary_sensor.openclose_10 + name: Elternbad + icon: mdi:window-open - type: vertical-stack cards: - type: custom:weather-card @@ -36,4 +48,4 @@ cards: aspect_ratio: 75% default_zoom: 15 entities: - - zone.home + - zone.home \ No newline at end of file diff --git a/sensors/mqtt.yaml b/sensors/mqtt.yaml index e3eecbc..ac33154 100644 --- a/sensors/mqtt.yaml +++ b/sensors/mqtt.yaml @@ -1,12 +1,44 @@ +- platform: mqtt + name: hygro_bathroom_parents_temperature + state_topic: "homeassistant-slaves-states/office/sensor/parents_bathroom_hygrometer_temperature/state" + force_update: true + unit_of_measurement: "°C" +- platform: mqtt + name: hygro_bathroom_parents_humidity + state_topic: "homeassistant-slaves-states/office/sensor/parents_bathroom_hygrometer_humidity/state" + force_update: true + unit_of_measurement: "%" + +- platform: mqtt + name: hygro_bathroom_kids_temperature + state_topic: "homeassistant-slaves-states/office/sensor/kids_bathroom_hygrometer_temperature/state" + force_update: true + unit_of_measurement: "°C" +- platform: mqtt + name: hygro_bathroom_kids_humidity + state_topic: "homeassistant-slaves-states/office/sensor/kids_bathroom_hygrometer_humidity/state" + force_update: true + unit_of_measurement: "%" + +- platform: mqtt + name: hygro_hwr_temperature + state_topic: "homeassistant-slaves-states/livingroom/sensor/hwr_hygrometer_temperature/state" + force_update: true + unit_of_measurement: "°C" +- platform: mqtt + name: hygro_hwr_humidity + state_topic: "homeassistant-slaves-states/livingroom/sensor/hwr_hygrometer_humidity/state" + force_update: true + unit_of_measurement: "%" + - platform: mqtt name: "mobile_fb_battery" state_topic: "homeassistant/sensor/android_mobile_fb_battery/state" unit_of_measurement: '%' value_template: "{{ value_json.level }}" json_attributes_topic: "homeassistant/sensor/android_mobile_fb_battery/state" - - platform: mqtt name: "mobile_fb_callstate" state_topic: "homeassistant/sensor/android_mobile_fb_callstate/state" value_template: "{{ value_json.state }}" - json_attributes_topic: "homeassistant/sensor/android_mobile_fb_callstate/state" \ No newline at end of file + json_attributes_topic: "homeassistant/sensor/android_mobile_fb_callstate/state"