From 0781f52d4a852ad2a80d3f1c7a2ba9eec3624dd8 Mon Sep 17 00:00:00 2001 From: Florian Brinker Date: Mon, 18 Mar 2019 20:07:08 +0100 Subject: [PATCH] Humidity and Layout changes --- automations/humidity.yaml | 36 +++++++------ configuration.yaml | 19 ++++--- lovelace-views/devices.yaml | 5 ++ lovelace-views/overview.yaml | 98 +++++++++++++++++++++++------------- sensors/misc.yaml | 1 + sensors/mqtt.yaml | 11 +--- 6 files changed, 104 insertions(+), 66 deletions(-) diff --git a/automations/humidity.yaml b/automations/humidity.yaml index b8b30c8..2975dfc 100644 --- a/automations/humidity.yaml +++ b/automations/humidity.yaml @@ -1,25 +1,31 @@ - alias: Dachboden Luftfeuchtigkeit trigger: - platform: numeric_state - entity_id: sensor.attic_humidity - value_template: '{{ state|float }}' - below: 35 - above: 65 + platform: template + value_template: "{% if (states.sensor.attic_humidity.state|float) > 64 or (states.sensor.attic_humidity.state|float) < 35 %}true{% endif %}" action: - service: notify.telegram_group + service: notify.android data: - title: 'Bitte den Dachboden lüften!' - message: 'Die Luftfeuchtigkeit liegt mit {{ states.sensor.attic_humidity.state }}% außerhalb des Grenzbereichs.' + title: 'Bitte den *Dachboden* lüften!' + message: 'Die Luftfeuchtigkeit liegt mit einem Wert von *{{ states.sensor.attic_humidity.state }}%* außerhalb des Grenzbereichs.' +#- alias: Badezimmer Luftfeuchtigkeit +# trigger: +# platform: numeric_state +# entity_id: sensor.bathroom_hygrometer_humidity +# value_template: '{{ state|float }}' +# below: 35 +# above: 65 +# action: +# service: notify.telegram_group +# data: +# title: 'Bitte das Badezimmer lüften!' +# message: 'Die Luftfeuchtigkeit liegt mit {{ states.sensor.bathroom_hygrometer_humidity.state }}% außerhalb des Grenzbereichs.' - alias: Badezimmer Luftfeuchtigkeit trigger: - platform: numeric_state - entity_id: sensor.bathroom_hygrometer_humidity - value_template: '{{ state|float }}' - below: 35 - above: 70 + platform: template + value_template: "{% if states.sensor.bathroom_hygrometer_humidity and ((states.sensor.bathroom_hygrometer_humidity.state|float) > 55 or (states.sensor.bathroom_hygrometer_humidity.state|float) < 35) %}true{% endif %}" action: service: notify.telegram_group data: - title: 'Bitte das Badezimmer lüften!' - message: 'Die Luftfeuchtigkeit liegt mit {{ states.sensor.bathroom_hygrometer_humidity.state }}% außerhalb des Grenzbereichs.' + title: 'Bitte das *Badezimmer* lüften!' + message: 'Die Luftfeuchtigkeit liegt mit einem Wert von *{{ states.sensor.bathroom_hygrometer_humidity.state }}%* außerhalb des Grenzbereichs.' diff --git a/configuration.yaml b/configuration.yaml index a70c767..9ea4060 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -6,8 +6,13 @@ homeassistant: unit_system: metric time_zone: Europe/Berlin customize: !include_dir_merge_named customizations/ - whitelist_external_dirs: - - /backuplogs + auth_providers: + - type: trusted_networks + trusted_networks: + - 127.0.0.1 + - ::1 + - 192.168.0.0/24 + - fd00::/8 frontend: @@ -18,9 +23,6 @@ http: trusted_proxies: - 127.0.0.1 - ::1 - trusted_networks: - - 192.168.0.0/16 - - fd00::/8 lovelace: mode: yaml @@ -130,6 +132,8 @@ notify: - name: telegram_fb platform: telegram chat_id: !secret telegram_chat_fb + - name: android + platform: fcm-android device_tracker: @@ -141,7 +145,6 @@ media_player: name: Fire TV host: !secret firetv_ip adbkey: !secret adbkey - get_source: true get_sources: true remote: @@ -166,6 +169,10 @@ binary_sensor: country: DE province: NW workdays: [ mon, tue, wed, thu, fri ] + - platform: tod + name: Morning + after: '05:00' + before: '11:00' - platform: mqtt state_topic: /home/camera/yihome1/motion/state name: YiHome1 Alarm diff --git a/lovelace-views/devices.yaml b/lovelace-views/devices.yaml index e2619d3..15aba8f 100644 --- a/lovelace-views/devices.yaml +++ b/lovelace-views/devices.yaml @@ -1,6 +1,11 @@ icon: mdi:cellphone-link path: devices cards: + - type: entities + entities: + - entity: sensor.myip + name: Öffentliche IP + icon: mdi:earth - type: entities title: Florian show_header_toggle: false diff --git a/lovelace-views/overview.yaml b/lovelace-views/overview.yaml index 1dca590..0362cfe 100644 --- a/lovelace-views/overview.yaml +++ b/lovelace-views/overview.yaml @@ -1,41 +1,67 @@ title: Übersicht path: overview cards: - - type: weather-forecast - entity: weather.openweathermap - - type: glance - title: Luftfeuchtigkeit - show_name: true - show_state: true - entities: - - entity: sensor.bathroom_hygrometer_humidity - name: Badezimmer - icon: mdi:water-percent - - entity: sensor.humidity_4 - name: Wohnzimmer - icon: mdi:water-percent - - entity: sensor.attic_humidity - name: Dachboden - icon: mdi:water-percent - - type: entities - entities: - - entity: sensor.myip - name: Öffentliche IP - icon: mdi:earth - type: vertical-stack cards: - - type: entities - title: Nächste Bahn nach Münster - show_header_toggle: false - entities: - - entity: sensor.salzbergen_to_munster_hbf - name: Abfahrt - - type: map - aspect_ratio: 16:9 - default_zoom: 15 - entities: - - zone.home - - type: glance - title: Anwesenheit - entities: - - device_tracker.mobile_fb \ No newline at end of file + - type: weather-forecast + entity: weather.openweathermap +# - type: iframe +# url: !secret iframe_windy +# aspect_ratio: 75% + - type: iframe + url: !secret iframe_earth + aspect_ratio: 75% + - type: conditional + conditions: + - entity: binary_sensor.workday_sensor + state: "on" + - entity: binary_sensor.morning + state: "on" + card: + type: entities + title: Nächste Bahn nach Münster + show_header_toggle: false + entities: + - entity: sensor.salzbergen_to_munster_hbf + name: Abfahrt + - type: vertical-stack + cards: + - type: glance + title: Temperatur + show_name: true + show_state: true + entities: + - entity: sensor.bathroom_hygrometer_temperature + name: Badezimmer + icon: mdi:thermometer + - entity: sensor.temperature_3 + name: Wohnzimmer + icon: mdi:thermometer + - entity: sensor.attic_temperature + name: Dachboden + icon: mdi:thermometer + - type: glance + title: Luftfeuchtigkeit + show_name: true + show_state: true + entities: + - entity: sensor.bathroom_hygrometer_humidity + name: Badezimmer + icon: mdi:water-percent + - entity: sensor.humidity_4 + name: Wohnzimmer + icon: mdi:water-percent + - entity: sensor.attic_humidity + name: Dachboden + icon: mdi:water-percent + - type: vertical-stack + cards: + - type: glance + title: Anwesenheit + entities: + - device_tracker.mobile_fb + - type: map + aspect_ratio: 75% + default_zoom: 15 + entities: + - zone.home \ No newline at end of file diff --git a/sensors/misc.yaml b/sensors/misc.yaml index 9036941..c8e36b3 100644 --- a/sensors/misc.yaml +++ b/sensors/misc.yaml @@ -12,6 +12,7 @@ - platform: deutsche_bahn from: "Salzbergen" to: "Münster HBF" + - platform: template sensors: salzbergen_to_munster_hbf_ontime: diff --git a/sensors/mqtt.yaml b/sensors/mqtt.yaml index 101714e..93f1808 100644 --- a/sensors/mqtt.yaml +++ b/sensors/mqtt.yaml @@ -3,20 +3,13 @@ state_topic: "homeassistant/sensor/android_mobile_fb_battery/state" unit_of_measurement: '%' value_template: "{{ value_json.level }}" - json_attributes: - - voltage - - temperature - - status - - power - - health - - technology + 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: - - icon + json_attributes_topic: "homeassistant/sensor/android_mobile_fb_callstate/state" - platform: mqtt name: "Attic Humidity"