I try to re-create my sensors (it is only 6, so i try with hand, not migration integration)
So here:
# Template binary sensors
- binary_sensor:
- default_entity_id: binary_sensor.riaszto_szirena_seged
name: riaszto_szirena_seged
unique_id: riaszto_szirena_seged
device_class: problem
state: "{{ is_state('switch.shelly1_32c43b', 'on') }}"
- default_entity_id: binary_sensor.wc_mozgas_seged
name: "WC virtuális mozgásérzékelő"
unique_id: wc_mozgas_seged
device_class: motion
delay_on:
seconds: 5
state: "{{ is_state('binary_sensor.0x54ef44100079a778_occupancy', 'on') }}"
# Template sensors
- sensor:
- default_entity_id: sensor.current_channel_1
name: "Shelly EM channel 1 Current"
unique_id: current_channel_1
unit_of_measurement: "A"
device_class: current
state: "{{ (states('sensor.shellyem_244cab416ef8_channel_1_power')|float(0) / states('sensor.shellyem_244cab416ef8_channel_1_voltage')|float(0)) | round(2) }}"
- default_entity_id: sensor.weather_wind_dir
name: "Wind Direction Friendly"
unique_id: weather_wind_dir
state: >
{% set direction = ['É','ÉÉK','ÉK','KÉK','K','KDK','DK','DDK','D','DDNY','DNY','NYDNY','NY','NYÉNY','ÉNY','ÉÉNY','É'] %}
{% set degree = states('sensor.ijszro2_wind_direction_degrees')|float %}
{{ direction[((degree+11.25)/22.5)|int] }}
- default_entity_id: sensor.energy_price
name: "Áram ár"
unique_id: energy_price
unit_of_measurement: "{currency}/kWh"
state: "{{ 36.4 if states('sensor.aramszamla_seged')|float <= 210 else 70.1 }}"
- default_entity_id: sensor.energy_price_exceeded_energy
name: "Túllépte a havi áram kedvezményes keretet?"
unique_id: energy_price_exceeded_energy
state: "{{ 'Nem (Havi limit: 210 kWh)' if states('sensor.aramszamla_seged')|float <= 210 else 'Igen (Havi limit: 210 kWh)' }}"
- default_entity_id: sensor.gas_price
name: "Gáz ár"
unique_id: gas_price
unit_of_measurement: "{currency}/m³"
state: >
{% set havi_limitek = [361.19,297.20,244.89,128.22,29.03,0,0,0,30.93,157.69,238.17,336.35] %}
{% set havi_limit = havi_limitek[now().month - 1] %}
{{ 102 if states('sensor.gas_consuming_tado')|float <= havi_limit else 747 }}
- default_entity_id: sensor.energy_price_exceeded_gas
name: "Túllépte a havi gáz kedvezményes keretet?"
unique_id: energy_price_exceeded_gas
state: >
{% set havi_limitek = [361.19,297.20,244.89,128.22,29.03,0,0,0,30.93,157.69,238.17,336.35] %}
{% set havi_limit = havi_limitek[now().month - 1] %}
{{ "Nem (Havi limit: " ~ havi_limit|string ~ " m3)" if states('sensor.gas_consuming_tado')|float <= havi_limit else "Igen (Havi limit: " ~ havi_limit|string ~ " m3)" }}
# Template covers
- cover:
- default_entity_id: cover.gate_both
name: "Gate both"
unique_id: gate_both
device_class: gate
state: "{{ is_state('binary_sensor.0x00158d0002fd4303_contact','on') }}"
icon: "{{ 'mdi:gate-open' if is_state('binary_sensor.0x00158d0002fd4303_contact','on') else 'mdi:gate' }}"
open_cover:
action: script.gate_both_open
close_cover:
action: script.gate_both_close
stop_cover:
action: script.gate_both_stop
- default_entity_id: cover.gate_left
name: "Gate left"
unique_id: gate_left
device_class: gate
state: "{{ is_state('binary_sensor.0x00158d0002fd4303_contact','on') }}"
icon: "{{ 'mdi:gate-open' if is_state('binary_sensor.0x00158d0002fd4303_contact','on') else 'mdi:gate' }}"
open_cover:
action: script.gate_left_open
close_cover:
action: script.gate_left_close
stop_cover:
action: script.gate_left_stop
I delete entities from old file (sensors.yaml for example) but now new ones are not created, if restart my HA