Fix start & Fix XEE & Fix Template MQTT
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,6 +8,9 @@
|
|||||||
!www
|
!www
|
||||||
!www/**
|
!www/**
|
||||||
!packages
|
!packages
|
||||||
|
!packages/**
|
||||||
|
!readme
|
||||||
|
!readme/**
|
||||||
|
|
||||||
# Folders ignoradas.
|
# Folders ignoradas.
|
||||||
.storage
|
.storage
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "Puerta Entrada" #Puerta de Entrada
|
name: "Puerta Entrada" #Puerta de Entrada
|
||||||
payload_on: "A2670A"
|
value_template: >-
|
||||||
payload_off: "A2670E"
|
{% if value_json.RfReceived.Data == 'A2670A' %}
|
||||||
|
{{'ON'}}
|
||||||
|
{% else %}
|
||||||
|
{{states('binary_sensor.puerta_entrada') | upper}}
|
||||||
|
{% endif %}
|
||||||
device_class: opening
|
device_class: opening
|
||||||
state_topic: "sonoffbridge/tele/RESULT"
|
state_topic: "sonoffbridge/tele/RESULT"
|
||||||
value_template: "{{value_json.RfReceived.Data}}"
|
off_delay: 10
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "Puerta Tendedero"
|
name: "Puerta Tendedero"
|
||||||
payload_on: "0D7F0A"
|
value_template: >-
|
||||||
payload_off: "0D7F0E"
|
{% if value_json.RfReceived.Data == '0D7F0A' %}
|
||||||
|
{{'ON'}}
|
||||||
|
{% else %}
|
||||||
|
{{states('binary_sensor.puerta_tendedero') | upper}}
|
||||||
|
{% endif %}
|
||||||
device_class: opening
|
device_class: opening
|
||||||
state_topic: "sonoffbridge/tele/RESULT"
|
state_topic: "sonoffbridge/tele/RESULT"
|
||||||
value_template: "{{value_json.RfReceived.Data}}"
|
off_delay: 10
|
||||||
|
|||||||
@@ -15,57 +15,77 @@ sensor:
|
|||||||
citroen_bateria:
|
citroen_bateria:
|
||||||
friendly_name: 'Citroen Batería'
|
friendly_name: 'Citroen Batería'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
{% if states.sensor.citroen_status.attributes.signals is defined -%}
|
||||||
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
||||||
{% if signals.name == "BatteryVoltage" %}
|
{% if signals.name == "BatteryVoltage" %}
|
||||||
{{ signals.value }}
|
{{ signals.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
{% else %}
|
||||||
|
Recargando.
|
||||||
|
{% endif %}
|
||||||
unit_of_measurement: 'V'
|
unit_of_measurement: 'V'
|
||||||
citroen_velocidad:
|
citroen_velocidad:
|
||||||
friendly_name: 'Citroen Velocidad'
|
friendly_name: 'Citroen Velocidad'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
{% if states.sensor.citroen_status.attributes.signals is defined -%}
|
||||||
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
||||||
{% if signals.name == "GpsSpeed" %}
|
{% if signals.name == "GpsSpeed" %}
|
||||||
{{ signals.value }}
|
{{ signals.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
{% else %}
|
||||||
|
Recargando.
|
||||||
|
{% endif %}
|
||||||
unit_of_measurement: 'Km/h'
|
unit_of_measurement: 'Km/h'
|
||||||
citroen_combustible:
|
citroen_combustible:
|
||||||
friendly_name: 'Citroen Gasolina'
|
friendly_name: 'Citroen Gasolina'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
{% if states.sensor.citroen_status.attributes.signals is defined -%}
|
||||||
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
||||||
{% if signals.name == "FuelLevel" %}
|
{% if signals.name == "FuelLevel" %}
|
||||||
{{ signals.value }}
|
{{ signals.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
{% else %}
|
||||||
|
Recargando.
|
||||||
|
{% endif %}
|
||||||
unit_of_measurement: 'L'
|
unit_of_measurement: 'L'
|
||||||
citroen_kilometros:
|
citroen_kilometros:
|
||||||
friendly_name: 'Citroen Total Km'
|
friendly_name: 'Citroen Total Km'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
{% if states.sensor.citroen_status.attributes.signals is defined -%}
|
||||||
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
||||||
{% if signals.name == "Odometer" %}
|
{% if signals.name == "Odometer" %}
|
||||||
{{ signals.value }}
|
{{ signals.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
{% else %}
|
||||||
|
Recargando.
|
||||||
|
{% endif %}
|
||||||
unit_of_measurement: 'km'
|
unit_of_measurement: 'km'
|
||||||
citroen_revoluciones:
|
citroen_revoluciones:
|
||||||
friendly_name: 'Citroen Revoluciones por Minuto'
|
friendly_name: 'Citroen Revoluciones por Minuto'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
{% if states.sensor.citroen_status.attributes.signals is defined -%}
|
||||||
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
{% for signals in states.sensor.citroen_status.attributes.signals -%}
|
||||||
{% if signals.name == "EngineSpeed" %}
|
{% if signals.name == "EngineSpeed" %}
|
||||||
{{ signals.value }}
|
{{ signals.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
{% else %}
|
||||||
|
Recargando.
|
||||||
|
{% endif %}
|
||||||
unit_of_measurement: 'tr/min'
|
unit_of_measurement: 'tr/min'
|
||||||
citroen_fecha_update:
|
citroen_fecha_update:
|
||||||
friendly_name: 'Citroen Actualización'
|
friendly_name: 'Citroen Actualización'
|
||||||
value_template: "{{ as_timestamp(states.sensor.citroen_status.attributes.updatedAt) | timestamp_custom('%D %-I:%M %P') }}"
|
value_template: "{{ as_timestamp(state_attr('sensor.citroen_status','updatedAt')) | timestamp_custom('%D %-I:%M %P') }}"
|
||||||
citroen_latitud:
|
citroen_latitud:
|
||||||
friendly_name: 'Citroen Latitud'
|
friendly_name: 'Citroen Latitud'
|
||||||
value_template: '{{ states.sensor.citroen_status.attributes.location.latitude }}'
|
value_template: '{{ state_attr("sensor.citroen_status", "location").latitude}}'
|
||||||
citroen_longitud:
|
citroen_longitud:
|
||||||
friendly_name: 'Citroen Longitud'
|
friendly_name: 'Citroen Longitud'
|
||||||
value_template: '{{ states.sensor.citroen_status.attributes.location.longitude }}'
|
value_template: '{{ state_attr("sensor.citroen_status", "location").longitude}}'
|
||||||
|
|
||||||
camera:
|
camera:
|
||||||
name: Posición Citroen
|
name: Posición Citroen
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
cloud:
|
#cloud:
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ sensor:
|
|||||||
state_topic: "shellies/shelly4pro-061E6E/relay/3/power"
|
state_topic: "shellies/shelly4pro-061E6E/relay/3/power"
|
||||||
unit_of_measurement: "W"
|
unit_of_measurement: "W"
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "Energia General Coche Eléctrico"
|
name: "Energia General Coche Eléctrico"
|
||||||
state_topic: "shellies/shelly4pro-061E6E/relay/3/energy"
|
state_topic: "shellies/shelly4pro-061E6E/relay/3/energy"
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
device_tracker:
|
device_tracker:
|
||||||
- platform: bluetooth_tracker
|
- platform: bluetooth_tracker
|
||||||
|
interval_seconds: 30
|
||||||
|
track_new_devices: false
|
||||||
|
|||||||
@@ -2,3 +2,4 @@
|
|||||||
discovery:
|
discovery:
|
||||||
ignore:
|
ignore:
|
||||||
- yeelight
|
- yeelight
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ sensor:
|
|||||||
state_topic: "shellies/shelly4pro-061E6E/relay/2/power"
|
state_topic: "shellies/shelly4pro-061E6E/relay/2/power"
|
||||||
unit_of_measurement: "W"
|
unit_of_measurement: "W"
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "Energia General Calefacción"
|
name: "Energia General Calefacción"
|
||||||
state_topic: "shellies/shelly4pro-061E6E/relay/2/energy"
|
state_topic: "shellies/shelly4pro-061E6E/relay/2/energy"
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ sensor:
|
|||||||
state_topic: "shellies/shelly4pro-061E6E/relay/0/power"
|
state_topic: "shellies/shelly4pro-061E6E/relay/0/power"
|
||||||
unit_of_measurement: "W"
|
unit_of_measurement: "W"
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "Energia General Luces"
|
name: "Energia General Luces"
|
||||||
state_topic: "shellies/shelly4pro-061E6E/relay/0/energy"
|
state_topic: "shellies/shelly4pro-061E6E/relay/0/energy"
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ sensor:
|
|||||||
state_topic: "shellies/shelly4pro-061E6E/relay/1/power"
|
state_topic: "shellies/shelly4pro-061E6E/relay/1/power"
|
||||||
unit_of_measurement: "W"
|
unit_of_measurement: "W"
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "Energia General Persianas"
|
name: "Energia General Persianas"
|
||||||
state_topic: "shellies/shelly4pro-061E6E/relay/1/energy"
|
state_topic: "shellies/shelly4pro-061E6E/relay/1/energy"
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "Movimiento Habitación Estudio"
|
name: "Movimiento Habitación Estudio"
|
||||||
payload_on: "2A00BC"
|
value_template: >-
|
||||||
payload_off: "2A00BCoff"
|
{% if value_json.RfReceived.Data == '2A00BC' %}
|
||||||
|
{{'ON'}}
|
||||||
|
{% else %}
|
||||||
|
{{states('binary_sensor.movimiento_habitacion_estudio') | upper}}
|
||||||
|
{% endif %}
|
||||||
device_class: motion
|
device_class: motion
|
||||||
state_topic: "sonoffbridge/tele/RESULT"
|
state_topic: "sonoffbridge/tele/RESULT"
|
||||||
value_template: "{{value_json.RfReceived.Data}}"
|
off_delay: 10
|
||||||
off_delay: 8
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "Movimiento Habitación Principal"
|
name: "Movimiento Habitación Principal"
|
||||||
payload_on: "FDE2BC"
|
value_template: >-
|
||||||
payload_off: "FDE2BCoff"
|
{% if value_json.RfReceived.Data == 'FDE2BC' %}
|
||||||
|
{{'ON'}}
|
||||||
|
{% else %}
|
||||||
|
{{states('binary_sensor.movimiento_habitacion_principal') | upper}}
|
||||||
|
{% endif %}
|
||||||
device_class: motion
|
device_class: motion
|
||||||
state_topic: "sonoffbridge/tele/RESULT"
|
state_topic: "sonoffbridge/tele/RESULT"
|
||||||
value_template: "{{value_json.RfReceived.Data}}"
|
off_delay: 10
|
||||||
off_delay: 8
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "Movimiento Pasillo Habitaciones"
|
name: "Movimiento Pasillo Habitaciones"
|
||||||
payload_on: "5D559C"
|
value_template: >-
|
||||||
payload_off: "5D559Coff"
|
{% if value_json.RfReceived.Data == '5D559C' %}
|
||||||
|
{{'ON'}}
|
||||||
|
{% else %}
|
||||||
|
{{states('binary_sensor.movimiento_pasillo_habitaciones') | upper}}
|
||||||
|
{% endif %}
|
||||||
device_class: motion
|
device_class: motion
|
||||||
state_topic: "sonoffbridge/tele/RESULT"
|
state_topic: "sonoffbridge/tele/RESULT"
|
||||||
value_template: "{{value_json.RfReceived.Data}}"
|
off_delay: 10
|
||||||
off_delay: 8
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,57 +15,64 @@ sensor:
|
|||||||
smart_bateria:
|
smart_bateria:
|
||||||
friendly_name: 'Smart Batería'
|
friendly_name: 'Smart Batería'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
{% if states.sensor.smart_status.attributes.signals is defined -%}
|
||||||
{% for signals in states.sensor.smart_status.attributes.signals -%}
|
{% for signals in states.sensor.smart_status.attributes.signals -%}
|
||||||
{% if signals.name == "BatteryVoltage" %}
|
{% if signals.name == "BatteryVoltage" %}
|
||||||
{{ signals.value }}
|
{{ signals.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
{% else %}
|
||||||
|
Recargando.
|
||||||
|
{% endif %}
|
||||||
unit_of_measurement: 'V'
|
unit_of_measurement: 'V'
|
||||||
smart_velocidad:
|
smart_velocidad:
|
||||||
friendly_name: 'Smart Velocidad'
|
friendly_name: 'Smart Velocidad'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
{% if states.sensor.smart_status.attributes.signals is defined -%}
|
||||||
{% for signals in states.sensor.smart_status.attributes.signals -%}
|
{% for signals in states.sensor.smart_status.attributes.signals -%}
|
||||||
{% if signals.name == "GpsSpeed" %}
|
{% if signals.name == "GpsSpeed" %}
|
||||||
{{ signals.value }}
|
{{ signals.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
{% else %}
|
||||||
|
Recargando.
|
||||||
|
{% endif %}
|
||||||
unit_of_measurement: 'Km/h'
|
unit_of_measurement: 'Km/h'
|
||||||
# smart_combustible:
|
|
||||||
# friendly_name: 'Smart Gasolina'
|
|
||||||
# value_template: >-
|
|
||||||
# {% for signals in states.sensor.smart_status.attributes.signals -%}
|
|
||||||
# {% if signals.name == "FuelLevel" %}
|
|
||||||
# {{ signals.value }}
|
|
||||||
# {% endif %}
|
|
||||||
# {%- endfor -%}
|
|
||||||
# unit_of_measurement: 'L'
|
|
||||||
smart_kilometros:
|
smart_kilometros:
|
||||||
friendly_name: 'Smart Total Km'
|
friendly_name: 'Smart Total Km'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
{% if states.sensor.smart_status.attributes.signals is defined -%}
|
||||||
{% for signals in states.sensor.smart_status.attributes.signals -%}
|
{% for signals in states.sensor.smart_status.attributes.signals -%}
|
||||||
{% if signals.name == "Odometer" %}
|
{% if signals.name == "Odometer" %}
|
||||||
{{ signals.value }}
|
{{ signals.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
{% else %}
|
||||||
|
Recargando.
|
||||||
|
{% endif %}
|
||||||
unit_of_measurement: 'km'
|
unit_of_measurement: 'km'
|
||||||
smart_revoluciones:
|
smart_revoluciones:
|
||||||
friendly_name: 'Smart Revoluciones por Minuto'
|
friendly_name: 'Smart Revoluciones por Minuto'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
{% if states.sensor.smart_status.attributes.signals is defined -%}
|
||||||
{% for signals in states.sensor.smart_status.attributes.signals -%}
|
{% for signals in states.sensor.smart_status.attributes.signals -%}
|
||||||
{% if signals.name == "EngineSpeed" %}
|
{% if signals.name == "EngineSpeed" %}
|
||||||
{{ signals.value }}
|
{{ signals.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
{% else %}
|
||||||
|
Recargando.
|
||||||
|
{% endif %}
|
||||||
unit_of_measurement: 'tr/min'
|
unit_of_measurement: 'tr/min'
|
||||||
smart_fecha_update:
|
smart_fecha_update:
|
||||||
friendly_name: 'Smart Actualización'
|
friendly_name: 'Smart Actualización'
|
||||||
value_template: "{{ as_timestamp(states.sensor.smart_status.attributes.updatedAt) | timestamp_custom('%D %-I:%M %P') }}"
|
value_template: "{{ as_timestamp(state_attr('sensor.smart_status','updatedAt')) | timestamp_custom('%D %-I:%M %P') }}"
|
||||||
smart_latitud:
|
smart_latitud:
|
||||||
friendly_name: 'Smart Latitud'
|
friendly_name: 'Smart Latitud'
|
||||||
value_template: '{{ states.sensor.smart_status.attributes.location.latitude }}'
|
value_template: '{{ state_attr("sensor.smart_status", "location").latitude}}'
|
||||||
smart_longitud:
|
smart_longitud:
|
||||||
friendly_name: 'Smart Longitud'
|
friendly_name: 'Smart Longitud'
|
||||||
value_template: '{{ states.sensor.smart_status.attributes.location.longitude }}'
|
value_template: '{{ state_attr("sensor.smart_status", "location").longitude}}'
|
||||||
|
|
||||||
camera:
|
camera:
|
||||||
name: Posición Smart
|
name: Posición Smart
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
tts:
|
#tts:
|
||||||
- platform: google
|
# - platform: google
|
||||||
|
|||||||
1
readme/sonoff-rf-bridge.md
Normal file
1
readme/sonoff-rf-bridge.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
https://community.home-assistant.io/t/sonoff-rf-bridge-strategies-for-receiving-data/108181?u=123
|
||||||
Reference in New Issue
Block a user