mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-10-14 16:35:12 +02:00
common: enable ha_time in common packages, devices extend it
Move the homeassistant time platform (id ha_time) into all common packages. Devices with custom triggers now use '!extend ha_time'; plain duplicate time blocks are removed. mcu-lvgl's unused time_comp is unified to ha_time.
This commit is contained in:
1 parent
eea872b930
commit
d813717d2c
32 files changed
+24
-99
No files matched your search
+2
-2
@@ -24,8 +24,8 @@ text_sensor:
|
||||
# - <<: !include text_sensor/uptime.yaml
|
||||
- <<: !include text_sensor/wifi_info.yaml
|
||||
|
||||
# time:
|
||||
#. - <<: !include time/homeassistant.yaml
|
||||
time:
|
||||
- <<: !include time/homeassistant.yaml
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
@@ -24,5 +24,8 @@ text_sensor:
|
||||
- <<: !include text_sensor/version.yaml
|
||||
- <<: !include text_sensor/wifi_info.yaml
|
||||
|
||||
time:
|
||||
- <<: !include time/homeassistant.yaml
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
@@ -23,5 +23,8 @@ text_sensor:
|
||||
- <<: !include text_sensor/version.yaml
|
||||
- <<: !include text_sensor/wifi_info.yaml
|
||||
|
||||
time:
|
||||
- <<: !include time/homeassistant.yaml
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
@@ -21,5 +21,8 @@ text_sensor:
|
||||
- <<: !include text_sensor/version.yaml
|
||||
- <<: !include text_sensor/ethernet_info.yaml
|
||||
|
||||
time:
|
||||
- <<: !include time/homeassistant.yaml
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
@@ -27,3 +27,6 @@ text_sensor:
|
||||
- <<: !include text_sensor/git_ref.yaml
|
||||
- <<: !include text_sensor/version.yaml
|
||||
- <<: !include text_sensor/wifi_info.yaml
|
||||
|
||||
time:
|
||||
- <<: !include time/homeassistant.yaml
|
||||
+1
-2
@@ -491,8 +491,7 @@ sensor:
|
||||
# name: Dallas Temp 4
|
||||
# one_wire_id: hub_1
|
||||
|
||||
time:
|
||||
- !include common/time/homeassistant.yaml
|
||||
# time:
|
||||
# - platform: sntp
|
||||
# id: sntp_time
|
||||
# timezone: Europe/Bratislava
|
||||
|
||||
+1
-2
@@ -139,8 +139,7 @@ switch:
|
||||
id: relay_2
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
timezone: Europe/Bratislava
|
||||
- id: !extend ha_time
|
||||
on_time:
|
||||
- seconds: 0
|
||||
minutes: /15
|
||||
|
||||
@@ -31,11 +31,6 @@ packages:
|
||||
|
||||
debug:
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
i2c:
|
||||
# - id: i2c0
|
||||
sda: 32
|
||||
|
||||
@@ -109,11 +109,6 @@ globals:
|
||||
restore_value: no
|
||||
initial_value: "false"
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
display:
|
||||
- platform: tm1637
|
||||
id: tm1637_display
|
||||
|
||||
@@ -51,11 +51,6 @@ globals:
|
||||
restore_value: no
|
||||
initial_value: "false"
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: Button
|
||||
|
||||
@@ -242,11 +242,6 @@ binary_sensor:
|
||||
# on_clockwise:
|
||||
# - display_menu.down:
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
# display:
|
||||
# - platform: tm1637
|
||||
# id: tm1637_display
|
||||
|
||||
@@ -44,11 +44,6 @@ packages:
|
||||
# Relay1 G22
|
||||
# Relay2 G19
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
i2c:
|
||||
# - id: i2c0
|
||||
# sda: 26
|
||||
|
||||
+1
-3
@@ -129,9 +129,7 @@ globals:
|
||||
initial_value: '20.5'
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
- id: !extend ha_time
|
||||
on_time:
|
||||
- seconds: 0
|
||||
minutes: /1
|
||||
|
||||
@@ -55,11 +55,6 @@ api:
|
||||
# Relay1 G22
|
||||
# Relay2 G19
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
i2c:
|
||||
# - id: i2c0
|
||||
# sda: 26
|
||||
|
||||
@@ -158,10 +158,6 @@ text_sensor:
|
||||
icon: mdi:clock-start
|
||||
internal: True
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: time_comp
|
||||
|
||||
number:
|
||||
- platform: template
|
||||
initial_value: 0
|
||||
|
||||
+1
-3
@@ -26,9 +26,7 @@ packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
- id: !extend ha_time
|
||||
on_time_sync:
|
||||
- bm8563.write_time
|
||||
- platform: bm8563
|
||||
|
||||
@@ -228,9 +228,7 @@ button:
|
||||
- pzemac.reset_energy: pzemac_l3
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
- id: !extend ha_time
|
||||
on_time:
|
||||
- cron: '0 0 0 * * *'
|
||||
then:
|
||||
|
||||
@@ -136,9 +136,7 @@ nspanel_lovelace:
|
||||
thermo_entity_id: climate.bt_trv_bedroom
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
- id: !extend ha_time
|
||||
on_time_sync:
|
||||
- script.execute: apply_sleep_dim
|
||||
|
||||
|
||||
@@ -540,11 +540,6 @@ sensor:
|
||||
- platform: template
|
||||
id: room_temperature_id
|
||||
|
||||
time:
|
||||
platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
text_sensor:
|
||||
- platform: homeassistant
|
||||
id: name_day
|
||||
|
||||
@@ -185,11 +185,6 @@ nspanel_lovelace:
|
||||
- name: Auto-zatváranie
|
||||
entity_id: switch.gate_auto_close
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: Left Button
|
||||
|
||||
@@ -134,11 +134,6 @@ nspanel_lovelace:
|
||||
- name: Auto-zatváranie
|
||||
entity_id: switch.gate_auto_close
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: Left Button
|
||||
|
||||
@@ -158,11 +158,6 @@ nspanel_lovelace:
|
||||
- name: Auto-zatváranie
|
||||
entity_id: switch.gate_auto_close
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: Left Button
|
||||
|
||||
@@ -214,11 +214,6 @@ nspanel_lovelace:
|
||||
- name: Rast trávy
|
||||
entity_id: automation.irrigation_grow_grass
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: Left Button
|
||||
|
||||
@@ -54,11 +54,6 @@ packages:
|
||||
# Relay1 G22
|
||||
# Relay2 G19
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
i2c:
|
||||
# - id: i2c0
|
||||
# sda: 26
|
||||
|
||||
@@ -187,5 +187,3 @@ switch:
|
||||
- switch.turn_off: relay_off # bi-stable relay so no need to keep on
|
||||
interlock: [relay_on]
|
||||
|
||||
time:
|
||||
- !include common/time/homeassistant.yaml
|
||||
+1
-4
@@ -2,7 +2,7 @@
|
||||
substitutions:
|
||||
device: pow-washer
|
||||
name: Washer POW
|
||||
comment:
|
||||
comment: "spare"
|
||||
area: Washroom
|
||||
update_interval: 10s
|
||||
|
||||
@@ -186,6 +186,3 @@ switch:
|
||||
- delay: 500ms
|
||||
- switch.turn_off: relay_off # bi-stable relay so no need to keep on
|
||||
interlock: [relay_on]
|
||||
|
||||
time:
|
||||
- !include common/time/homeassistant.yaml
|
||||
@@ -109,5 +109,3 @@ switch:
|
||||
number: 19
|
||||
mode: OUTPUT
|
||||
|
||||
time:
|
||||
- !include common/time/homeassistant.yaml
|
||||
+1
-2
@@ -121,8 +121,7 @@ switch:
|
||||
# number: GPIO00
|
||||
# inverted: True
|
||||
|
||||
time:
|
||||
- !include common/time/homeassistant.yaml
|
||||
# time:
|
||||
# - platform: homeassistant
|
||||
# timezone: Europe/Bratislava
|
||||
# on_time:
|
||||
|
||||
+1
-2
@@ -122,8 +122,7 @@ switch:
|
||||
on_turn_off:
|
||||
- light.turn_off: light_red
|
||||
|
||||
time:
|
||||
- !include common/time/homeassistant.yaml
|
||||
# time:
|
||||
# - platform: homeassistant
|
||||
# timezone: Europe/Bratislava
|
||||
# on_time:
|
||||
|
||||
+1
-2
@@ -144,8 +144,7 @@ switch:
|
||||
# number: GPIO00
|
||||
# inverted: True
|
||||
|
||||
time:
|
||||
- !include common/time/homeassistant.yaml
|
||||
# time:
|
||||
# - platform: homeassistant
|
||||
# timezone: Europe/Bratislava
|
||||
# on_time:
|
||||
|
||||
@@ -883,4 +883,3 @@ time:
|
||||
id: rtc_time
|
||||
i2c_id: i2c_bsp
|
||||
update_interval: never
|
||||
- !include common/time/homeassistant.yaml
|
||||
@@ -358,5 +358,3 @@ valve:
|
||||
close_action:
|
||||
- switch.turn_off: irrigation_relay_8
|
||||
|
||||
time:
|
||||
- !include common/time/homeassistant.yaml
|
||||
Reference in new issue
Block a user