diff --git a/config/lovelace/advanced_dashboard/10_system.yaml b/config/lovelace/advanced_dashboard/10_system.yaml index c88981b..1f4ec74 100644 --- a/config/lovelace/advanced_dashboard/10_system.yaml +++ b/config/lovelace/advanced_dashboard/10_system.yaml @@ -196,6 +196,11 @@ cards: name: Climate tap_action: none entities: + - automation.climate_ac_turn_on_if_hot + - automation.climate_ac_turn_off_if_window_opened + - automation.climate_ac_turn_off_if_cold + - automation.climate_ac_turn_off_if_working_at_night + - type: divider - automation.purifier_on_start_sync_and_update_state - automation.purifier_change_speed - automation.purifier_sync_speed diff --git a/config/packages/devices/living_room/toshiba_ac.yaml b/config/packages/devices/living_room/toshiba_ac.yaml index e555f8d..f29308b 100644 --- a/config/packages/devices/living_room/toshiba_ac.yaml +++ b/config/packages/devices/living_room/toshiba_ac.yaml @@ -25,3 +25,111 @@ climate: - "auto" supported_swing_list: - "off" + +automation: + - alias: Climate 路聽AC 路聽Turn on if hot + trigger: + - platform: numeric_state + entity_id: sensor.trisensor_temperature + above: 24 + - platform: state + entity_id: binary_sensor.living_room_right_window_on_off_wrapper + from: "on" + to: "off" + condition: + condition: and + conditions: + - condition: numeric_state + entity_id: sensor.trisensor_temperature + above: 24 + - condition: state + entity_id: input_boolean.georgi_home + state: "on" + - condition: state + entity_id: binary_sensor.living_room_right_window_on_off_wrapper + state: "off" + - condition: state + entity_id: binary_sensor.bedroom_right_window_on_off_wrapper + state: "off" + - condition: state + entity_id: climate.toshiba_ac + state: "off" + action: + - 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 + + - alias: Climate 路聽AC 路聽Turn off if window opened + trigger: + platform: state + entity_id: binary_sensor.living_room_right_window_on_off_wrapper + from: "off" + to: "on" + condition: + condition: and + conditions: + - condition: template + value_template: "{{ not is_state('climate.toshiba_ac', 'off') }}" + action: + - service: climate.turn_off + entity_id: climate.toshiba_ac + - service: logbook.log + data: + name: "馃挩 Climate Module 路 " + message: "AC 路 Switching off 路 Window opene" + domain: climate + + - alias: Climate 路聽AC 路聽Turn off if cold + trigger: + platform: numeric_state + entity_id: sensor.trisensor_temperature + below: 20 + condition: + condition: and + conditions: + - condition: template + value_template: "{{ not is_state('climate.toshiba_ac', 'off') }}" + action: + - service: climate.turn_off + entity_id: climate.toshiba_ac + - service: logbook.log + data: + name: "馃挩 Climate Module 路 " + message: "AC 路 Switching off 路 Below 20 degrees" + domain: climate + + - alias: Climate 路聽AC 路聽Turn off if working at night + trigger: + platform: time + at: "05:00:00" + condition: + condition: and + conditions: + - condition: template + value_template: "{{ not is_state('climate.toshiba_ac', 'off') }}" + action: + - service: climate.turn_off + entity_id: climate.toshiba_ac + - service: logbook.log + data: + name: "馃挩 Climate Module 路 " + message: "AC 路 Switching off 路 It's 5 AM" + domain: climate