Cambios en modo puertas

This commit is contained in:
dfcarvajal
2020-12-27 17:18:43 +01:00
parent f4ad89860e
commit 962dd8198b
5 changed files with 28 additions and 29 deletions

View File

@@ -0,0 +1,13 @@
binary_sensor:
- platform: template
sensors:
puerta_bano_general:
friendly_name: "Puerta Bano General"
entity_id:
- binary_sensor.puerta_bano_general_primario
- binary_sensor.puerta_bano_general_secundario
- binary_sensor.puerta_bano_general_zigbee
value_template: >-
{{ is_state('binary_sensor.puerta_bano_general_primario','on') or is_state('binary_sensor.puerta_bano_general_secundario','on')or is_state('binary_sensor.puerta_bano_general_zigbee','on') }}
device_class: door

View File

@@ -0,0 +1,13 @@
binary_sensor:
- platform: template
sensors:
puerta_bano_principal:
friendly_name: "Puerta Bano Principal"
entity_id:
- binary_sensor.puerta_bano_principal_primario
- binary_sensor.puerta_bano_principal_secundario
- binary_sensor.puerta_bano_principal_zigbee
value_template: >-
{{ is_state('binary_sensor.puerta_bano_principal_primario','on') or is_state('binary_sensor.puerta_bano_principal_secundario','on') or is_state('binary_sensor.puerta_bano_principal_zigbee','on') }}
device_class: door

View File

@@ -6,7 +6,8 @@ binary_sensor:
entity_id:
- binary_sensor.puerta_entrada_primario
- binary_sensor.puerta_entrada_secundario
- binary_sensor.puerta_entrada_zigbee
value_template: >-
{{ is_state('binary_sensor.puerta_entrada_primario','on') or is_state('binary_sensor.puerta_entrada_secundario','on') }}
{{ is_state('binary_sensor.puerta_entrada_primario','on') or is_state('binary_sensor.puerta_entrada_secundario','on') or is_state('binary_sensor.puerta_entrada_zigbee','on') }}
device_class: door

View File

@@ -1,14 +0,0 @@
binary_sensor:
- platform: mqtt
name: "Puerta Entrada Primario"
value_template: >-
{% if value_json.RfReceived.Data == 'A2670A' %}
{{'ON'}}
{% elif value_json.RfReceived.Data == 'A2670E' %}
{{'OFF'}}
{% else %}
{{states('binary_sensor.puerta_entrada_primario') | upper}}
{% endif %}
device_class: opening
state_topic: "sonoffbridge/tele/RESULT"
off_delay: 300

View File

@@ -1,14 +0,0 @@
binary_sensor:
- platform: mqtt
name: "Puerta Tendedero Primario"
value_template: >-
{% if value_json.RfReceived.Data == '0D7F0A' %}
{{'ON'}}
{% elif value_json.RfReceived.Data == '0D7F0E' %}
{{'OFF'}}
{% else %}
{{states('binary_sensor.puerta_tendedero_primario') | upper}}
{% endif %}
device_class: opening
state_topic: "sonoffbridge/tele/RESULT"
off_delay: 300