mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-06-14 03:48:53 +00:00
Refactor AC media player scripts and add binary sensors for cooling status AC filter changing. #273
This commit is contained in:
parent
b227b3d01d
commit
7dd07a011d
@ -42,14 +42,6 @@ script:
|
||||
|
||||
- delay: "00:01:30"
|
||||
|
||||
- service: media_player.play_media
|
||||
data:
|
||||
entity_id: media_player.garage
|
||||
media_content_id: 'turn off c life 4'
|
||||
media_content_type: custom
|
||||
|
||||
- delay: "00:01:30"
|
||||
|
||||
- service: media_player.play_media
|
||||
data:
|
||||
entity_id: media_player.garage
|
||||
|
@ -9,23 +9,34 @@ input_datetime:
|
||||
has_date: true
|
||||
has_time: true
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
downstairs_ac_cooling:
|
||||
friendly_name: "Downstairs AC is Cooling"
|
||||
value_template: >
|
||||
{{ state_attr('climate.downstairs', 'hvac_action') == 'cooling' }}
|
||||
|
||||
upstairs_ac_cooling:
|
||||
friendly_name: "Upstairs AC is Cooling"
|
||||
value_template: >
|
||||
{{ state_attr('climate.upstairs', 'hvac_action') == 'cooling' }}
|
||||
|
||||
sensor:
|
||||
- platform: history_stats
|
||||
name: Upstairs AC Runtime Since Last Filter Change
|
||||
entity_id: climate.upstairs
|
||||
attribute: hvac_action
|
||||
value: 'cooling'
|
||||
name: Downstairs AC Runtime Since Last Filter Change
|
||||
entity_id: binary_sensor.downstairs_ac_cooling
|
||||
state: 'on'
|
||||
type: time
|
||||
start: "{{ states('input_datetime.upstairs_last_filter_change') }}"
|
||||
start: "{{ states('input_datetime.downstairs_last_filter_change') }}"
|
||||
end: "{{ now() }}"
|
||||
|
||||
- platform: history_stats
|
||||
name: Downstairs AC Runtime Since Last Filter Change
|
||||
entity_id: climate.downstairs
|
||||
attribute: hvac_action
|
||||
value: 'cooling'
|
||||
name: Upstairs AC Runtime Since Last Filter Change
|
||||
entity_id: binary_sensor.upstairs_ac_cooling
|
||||
state: 'on'
|
||||
type: time
|
||||
start: "{{ states('input_datetime.downstairs_last_filter_change') }}"
|
||||
start: "{{ states('input_datetime.upstairs_last_filter_change') }}"
|
||||
end: "{{ now() }}"
|
||||
|
||||
script:
|
||||
|
Loading…
x
Reference in New Issue
Block a user