diff --git a/config/lovelace/home_dashboard/living_room_dashboard.yaml b/config/lovelace/home_dashboard/living_room_dashboard.yaml index 84045c5..3da644b 100644 --- a/config/lovelace/home_dashboard/living_room_dashboard.yaml +++ b/config/lovelace/home_dashboard/living_room_dashboard.yaml @@ -102,6 +102,7 @@ - entity: climate.toshiba_ac name: AC - entity: input_number.toshiba_cool_temp + - entity: input_number.toshiba_trigger_temp - type: vertical-stack cards: diff --git a/config/packages/devices/living_room/toshiba_ac.yaml b/config/packages/devices/living_room/toshiba_ac.yaml index 9ad267c..c2dc78b 100644 --- a/config/packages/devices/living_room/toshiba_ac.yaml +++ b/config/packages/devices/living_room/toshiba_ac.yaml @@ -30,10 +30,17 @@ input_number: toshiba_cool_temp: name: AC cool temp unit_of_measurement: "潞C" - min: 18 + min: 17 max: 21 step: 1 icon: mdi:air-conditioner + toshiba_trigger_temp: + name: AC trigger temp + unit_of_measurement: "潞C" + min: 18 + max: 25 + step: 1 + icon: mdi:air-conditioner script: toshiba_ac_toggle_cool: @@ -69,16 +76,15 @@ script: - service: logbook.log data: name: "馃挩 Climate Module 路 " - message: "AC 路 Switching on 路 Above 24 degrees, windows closed" + message: "AC 路 Switching on" domain: climate toshiba_ac_on_cool_if_hot: sequence: - condition: and conditions: - - condition: numeric_state - entity_id: sensor.trisensor_temperature - above: 23 + - condition: template + value_template: "{{ states('sensor.trisensor_temperature')|float > states('input_number.toshiba_trigger_temp')|float }}" - condition: numeric_state entity_id: sensor.dark_sky_apparent_temperature above: 23 @@ -99,9 +105,8 @@ script: automation: - alias: Climate 路聽AC 路聽Turn on if hot trigger: - - platform: numeric_state - entity_id: sensor.trisensor_temperature - above: 23 + - platform: template + value_template: "{{ states('sensor.trisensor_temperature')|float > states('input_number.toshiba_trigger_temp')|float }}" - platform: state entity_id: - binary_sensor.living_room_right_window