Toggle AC from Wallmote

This commit is contained in:
2020-06-27 18:18:24 +03:00
parent c28e03cbbf
commit 26b2a043b2
3 changed files with 46 additions and 21 deletions
@@ -185,6 +185,7 @@ cards:
- automation.wallmote_living_room_2_hold_play_music - automation.wallmote_living_room_2_hold_play_music
- automation.wallmote_living_room_3_tap_toggle_main_lights - automation.wallmote_living_room_3_tap_toggle_main_lights
- automation.wallmote_living_room_3_hold_toggle_ambient_lights - automation.wallmote_living_room_3_hold_toggle_ambient_lights
- automation.wallmote_living_room_4_tap_toggle_ac
- automation.wallmote_living_room_4_hold_toggle_titanium - automation.wallmote_living_room_4_hold_toggle_titanium
- type: entities - type: entities
@@ -26,6 +26,31 @@ climate:
supported_swing_list: supported_swing_list:
- "off" - "off"
script:
toshiba_ac_on_cool:
sequence:
- service: climate.turn_on
entity_id: climate.toshiba_ac
- delay: "00:00:01"
- service: climate.set_hvac_mode
entity_id: climate.toshiba_ac
data:
hvac_mode: "cool"
- service: climate.set_fan_mode
entity_id: climate.toshiba_ac
data:
fan_mode: "auto"
- delay: "00:00:01"
- service: climate.set_temperature
entity_id: climate.toshiba_ac
data:
temperature: 19
- service: logbook.log
data:
name: "💨 Climate Module · "
message: "AC · Switching on · Above 24 degrees, windows closed"
domain: climate
automation: automation:
- alias: Climate · AC · Turn on if hot - alias: Climate · AC · Turn on if hot
trigger: trigger:
@@ -60,27 +85,7 @@ automation:
entity_id: climate.toshiba_ac entity_id: climate.toshiba_ac
state: "off" state: "off"
action: action:
- service: climate.turn_on - service: script.toshiba_ac_on_cool
entity_id: climate.toshiba_ac
- delay: "00:00:01"
- service: climate.set_hvac_mode
entity_id: climate.toshiba_ac
data:
hvac_mode: "cool"
- service: climate.set_fan_mode
entity_id: climate.toshiba_ac
data:
fan_mode: "auto"
- delay: "00:00:01"
- service: climate.set_temperature
entity_id: climate.toshiba_ac
data:
temperature: 19
- service: logbook.log
data:
name: "💨 Climate Module · "
message: "AC · Switching on · Above 24 degrees, windows closed"
domain: climate
- alias: Climate · AC · Turn off - alias: Climate · AC · Turn off
trigger: trigger:
@@ -94,6 +94,25 @@ automation:
- service: light.toggle - service: light.toggle
entity_id: light.living_room_ambient entity_id: light.living_room_ambient
- alias: Wallmote · Living room · 4 · Tap · Toggle AC
trigger:
platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.aeon_labs_zw130_wallmote_quad
node_id: 5
scene_id: 4
scene_data: 0
action:
- service_template: >-
{% if is_state('climate.toshiba_ac', 'off') %}
script.toshiba_ac_on_cool
{% else %}
climate.turn_off
{% endif %}
data_template:
entity_id: "{% if not is_state('climate.toshiba_ac', 'off') %}climate.toshiba_ac{%endif%}"
- alias: Wallmote · Living room · 4 · Hold · Toggle Titanium - alias: Wallmote · Living room · 4 · Hold · Toggle Titanium
trigger: trigger:
platform: event platform: event