Skip to content
Snippets Groups Projects
Commit ceddf326 authored by matt's avatar matt
Browse files

hauptschalter steuert zonenstatus

parent de7ba3ea
No related branches found
No related tags found
1 merge request!20hauptschalter steuert zonenstatus
......@@ -47,5 +47,5 @@ binary_sensor:
inverted: true
filters:
- delayed_on_off: 500ms
name: "warpzone Status"
name: "esphome_status_Hauptschalter"
device_class: presence
......@@ -54,13 +54,14 @@ influxdb:
token: {{ influxdb_token }}
default_measurement: units
# zonenstatus wird vom hauptschalter gesteuert, switch02 ping ist nicht mehr notwendig
# https://www.home-assistant.io/integrations/ping/
binary_sensor:
- platform: ping
host: TL-SG3452X
name: "Switch02"
count: 3
scan_interval: 20
#binary_sensor:
# - platform: ping
# host: TL-SG3452X
# name: "Switch02"
# count: 3
# scan_interval: 20
# https://www.home-assistant.io/integrations/rest_command/
rest_command:
......@@ -109,15 +110,16 @@ automation ansible:
# set zonenstatus
- alias: ANSIBLE_zonenstatus_set
description: Speichert Zonenstatus in einem Helper
mode: restart
trigger:
- platform: state
entity_id:
- binary_sensor.switch02
- binary_sensor.esphome_status_hauptschalter
from: "off"
to: "on"
- platform: state
entity_id:
- binary_sensor.switch02
- binary_sensor.esphome_status_hauptschalter
from: "on"
to: "off"
condition: []
......@@ -125,7 +127,7 @@ automation ansible:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.switch02
entity_id: binary_sensor.esphome_status_hauptschalter
state: "on"
sequence:
- service: input_select.select_option
......@@ -135,7 +137,7 @@ automation ansible:
entity_id: input_select.zonenstatus
- conditions:
- condition: state
entity_id: binary_sensor.switch02
entity_id: binary_sensor.esphome_status_hauptschalter
state: "off"
sequence:
- service: input_select.select_option
......@@ -143,7 +145,6 @@ automation ansible:
option: closed
target:
entity_id: input_select.zonenstatus
mode: restart
# send zonenstatus to MQTT, REST
- alias: ANSIBLE_zonenstatus_send_MQTT_REST
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment