mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-06-14 20:01:45 +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"
|
- 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
|
- service: media_player.play_media
|
||||||
data:
|
data:
|
||||||
entity_id: media_player.garage
|
entity_id: media_player.garage
|
||||||
|
@ -9,23 +9,34 @@ input_datetime:
|
|||||||
has_date: true
|
has_date: true
|
||||||
has_time: 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:
|
sensor:
|
||||||
- platform: history_stats
|
- platform: history_stats
|
||||||
name: Upstairs AC Runtime Since Last Filter Change
|
name: Downstairs AC Runtime Since Last Filter Change
|
||||||
entity_id: climate.upstairs
|
entity_id: binary_sensor.downstairs_ac_cooling
|
||||||
attribute: hvac_action
|
state: 'on'
|
||||||
value: 'cooling'
|
|
||||||
type: time
|
type: time
|
||||||
start: "{{ states('input_datetime.upstairs_last_filter_change') }}"
|
start: "{{ states('input_datetime.downstairs_last_filter_change') }}"
|
||||||
end: "{{ now() }}"
|
end: "{{ now() }}"
|
||||||
|
|
||||||
- platform: history_stats
|
- platform: history_stats
|
||||||
name: Downstairs AC Runtime Since Last Filter Change
|
name: Upstairs AC Runtime Since Last Filter Change
|
||||||
entity_id: climate.downstairs
|
entity_id: binary_sensor.upstairs_ac_cooling
|
||||||
attribute: hvac_action
|
state: 'on'
|
||||||
value: 'cooling'
|
|
||||||
type: time
|
type: time
|
||||||
start: "{{ states('input_datetime.downstairs_last_filter_change') }}"
|
start: "{{ states('input_datetime.upstairs_last_filter_change') }}"
|
||||||
end: "{{ now() }}"
|
end: "{{ now() }}"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user