Bin leider etwas unpässlich. Das sind alles Template Sensoren.
#Homematic-Batterie
#Fensterkontakte
- platform: template
sensors:
fk_bad_unten_bat:
friendly_name: "Fenster_Bad_unten"
value_template: >-
{% set voltage = states('sensor.fensterkontakt_bad_unten_operating_voltage') | float %}
{% if is_state('binary_sensor.fensterkontakt_bad_unten_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
fk_bad_oben_bat:
friendly_name: "Fenster_Bad_oben"
value_template: >-
{% set voltage = states('sensor.fensterkontakt_bad_oben_operating_voltage') | float %}
{% if is_state('binary_sensor.fensterkontakt_bad_oben_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
fk_umkleide_bat:
friendly_name: "Fenster_Umkleide"
value_template: >-
{% set voltage = states('sensor.fensterkontakt_umkleide_operating_voltage') | float %}
{% if is_state('binary_sensor.fensterkontakt_umkleide_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
fk_sch_kl_bat:
friendly_name: "Fenster_Schafz_klein"
value_template: >-
{% set voltage = states('sensor.fensterkontakt_schlafen_klein_operating_voltage') | float %}
{% if is_state('binary_sensor.fensterkontakt_schlafen_klein_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
fk_sch_gr_bat:
friendly_name: "Fenster_Schlafz_groß"
value_template: >-
{% set voltage = states('sensor.fensterkontakt_schafen_gross_operating_voltage') | float %}
{% if is_state('binary_sensor.fensterkontakt_schafen_gross_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
#Heizkörperthermostate
hz_bad_oben_bat:
friendly_name: "Heiz_Bad_oben"
value_template: >-
{% set voltage = states('sensor.heizkorperthermostat_bad_oben_operating_voltage') | float %}
{% if is_state('binary_sensor.heizkorperthermostat_bad_oben_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
hz_flur_eingang_bat:
friendly_name: "Heiz_Flur_eingang"
value_template: >-
{% set voltage = states('sensor.heizkorperthermostat_flur_eingang_operating_voltage') | float %}
{% if is_state('binary_sensor.heizkorperthermostat_flur_eingang_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
hz_schlafz_gr_bat:
friendly_name: "Heiz_Schlafz_groß"
value_template: >-
{% set voltage = states('sensor.heizkorperthermostat_schlafen_gross_operating_voltage') | float %}
{% if is_state('binary_sensor.heizkorperthermostat_schlafen_gross_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
hz_schlafz_kl_bat:
friendly_name: "Heiz_Schlafz_klein"
value_template: >-
{% set voltage = states('sensor.heizkorperthermostat_schlafen_klein_operating_voltage') | float %}
{% if is_state('binary_sensor.heizkorperthermostat_schlafen_klein_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
hz_umkl_bat:
friendly_name: "Heiz_Umkleide"
value_template: >-
{% set voltage = states('sensor.heizkorperthermostat_umkleide_operating_voltage') | float %}
{% if is_state('binary_sensor.heizkorperthermostat_umkleide_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
#Wandthermostate
wth_schl_klein_bat:
friendly_name: "WTH_Schlafz_klein"
value_template: >-
{% set voltage = states('sensor.wandthermostat_schlafen_klein_operating_voltage') | float %}
{% if is_state('binary_sensor.wandthermostat_schlafen_klein_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
wth_schl_gr_bat:
friendly_name: "WTH_Schlafz_groß"
value_template: >-
{% set voltage = states('sensor.wandthermostat_schlafen_gross_operating_voltage') | float %}
{% if is_state('binary_sensor.wandthermostat_schlafen_gross_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
wth_bad_oben_bat:
friendly_name: "WTH_Bad_oben"
value_template: >-
{% set voltage = states('sensor.wandthermostat_bad_oben_operating_voltage') | float %}
{% if is_state('binary_sensor.wandthermostat_bad_oben_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
wth_bad_unten_bat:
friendly_name: "WTH_Bad_unten"
value_template: >-
{% set voltage = states('sensor.wandthermostat_bad_unten_operating_voltage') | float %}
{% if is_state('binary_sensor.wandthermostat_bad_unten_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
wth_essz_bat:
friendly_name: "WTH_Esszimmer"
value_template: >-
{% set voltage = states('sensor.wandthermostat_esszimmer_operating_voltage') | float %}
{% if is_state('binary_sensor.wandthermostat_esszimmer_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
wth_flur_eing_bat:
friendly_name: "WTH_Flur_Eingang"
value_template: >-
{% set voltage = states('sensor.wandthermostat_flur_eingang_operating_voltage') | float %}
{% if is_state('binary_sensor.wandthermostat_flur_eingang_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
wth_kuche_bat:
friendly_name: "WTH_Küche"
value_template: >-
{% set voltage = states('sensor.wandthermostat_kuche_operating_voltage') | float %}
{% if is_state('binary_sensor.wandthermostat_kuche_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
wth_umkl_bat:
friendly_name: "WTH_Umkleide"
value_template: >-
{% set voltage = states('sensor.wandthermostat_umkleide_operating_voltage') | float %}
{% if is_state('binary_sensor.wandthermostat_umkleide_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
wth_wohnz_bat:
friendly_name: "WTH_Wohnzimmer"
value_template: >-
{% set voltage = states('sensor.wandthermostat_wohnzimmer_operating_voltage') | float %}
{% if is_state('binary_sensor.wandthermostat_wohnzimmer_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
wth_speicher_bat:
friendly_name: "WTH_Speicher"
value_template: >-
{% set voltage = states('sensor.raumthermostat_speicher_betriebsspannung') | float %}
{% if is_state('binary_sensor.raumthermostat_speicher_batterie', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
#Taster
taster_kuche_bat:
friendly_name: "Taster_Küche"
value_template: >-
{% set voltage = states('sensor.6_fach_taster_kuche_operating_voltage') | float %}
{% if is_state('binary_sensor.6_fach_taster_kuche_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
taster_schaf_klein_bat:
friendly_name: "Taster_Schlaftzimmer_klein"
value_template: >-
{% set voltage = states('sensor.taster_schlafen_klein_operating_voltage') | float %}
{% if is_state('binary_sensor.taster_schlafen_klein_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
taster_schaf_gr_bat:
friendly_name: "Taster_Schlaftzimmer_groß"
value_template: >-
{% set voltage = states('sensor.taster_schlafzimmer_operating_voltage') | float %}
{% if is_state('binary_sensor.taster_schlafzimmer_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
taster_umkl_bat:
friendly_name: "Taster_Umkleide"
value_template: >-
{% set voltage = states('sensor.taster_umkleide_operating_voltage') | float %}
{% if is_state('binary_sensor.taster_umkleide_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"
#Fernbedienung
fernbediehnung_bat:
friendly_name: "Fernbedienung"
value_template: >-
{% set voltage = states('sensor.fernbedienung_rolladen_ug_operating_voltage') | float %}
{% if is_state('binary_sensor.fernbedienung_rolladen_ug_low_battery', 'on') %}
0
{% else %}
{{ ((voltage - 2.1) / (3 - 2.1) * 100) | round(0) }}
{% endif %}
unit_of_measurement: "%"