diff --git a/config/lovelace/advanced_dashboard/03_climate.yaml b/config/lovelace/advanced_dashboard/03_climate.yaml index de10987..9ddb892 100644 --- a/config/lovelace/advanced_dashboard/03_climate.yaml +++ b/config/lovelace/advanced_dashboard/03_climate.yaml @@ -30,6 +30,8 @@ cards: - climate.kitchen_radiator_mode - script.turn_on_all_radiators - type: divider + - input_boolean.ac_heating + - input_number.toshiba_heat_temp - input_number.toshiba_cool_temp - input_number.toshiba_trigger_temp - type: custom:decluttering-card diff --git a/config/lovelace/button_card_templates/devices/ac_button.yaml b/config/lovelace/button_card_templates/devices/ac_button.yaml index de4a02a..95f62bb 100644 --- a/config/lovelace/button_card_templates/devices/ac_button.yaml +++ b/config/lovelace/button_card_templates/devices/ac_button.yaml @@ -13,4 +13,4 @@ ac_button: - color: black tap_action: action: call-service - service: script.toshiba_ac_toggle_cool + service: script.toshiba_ac_toggle diff --git a/config/packages/devices/living_room/living_room_opple.yaml b/config/packages/devices/living_room/living_room_opple.yaml index 2c2115c..85cf86b 100644 --- a/config/packages/devices/living_room/living_room_opple.yaml +++ b/config/packages/devices/living_room/living_room_opple.yaml @@ -94,7 +94,7 @@ automation: temperature: "{{ state_attr('climate.toshiba_ac', 'temperature') | int -1}}" button_6_single: - - service: script.toshiba_ac_on_cool + - service: script.toshiba_ac_toggle button_6_double: - service: climate.set_temperature diff --git a/config/packages/devices/living_room/toshiba_ac.yaml b/config/packages/devices/living_room/toshiba_ac.yaml index f440223..bd13e19 100644 --- a/config/packages/devices/living_room/toshiba_ac.yaml +++ b/config/packages/devices/living_room/toshiba_ac.yaml @@ -1,3 +1,8 @@ +input_boolean: + ac_heating: + name: AC Heating enabled + icon: mdi:air-conditioner + # https://github.com/hristo-atanasov/Tasmota-IRHVAC/ climate: - platform: tasmota_irhvac @@ -9,7 +14,7 @@ climate: max_temp: 30 # optional - default 32 int value min_temp: 17 target_temp: 22 # optional - default 26 int value - away_temp: 18 # ptional - default 24 int value + away_temp: 18 # optional - default 24 int value supported_modes: - "heat" - "cool" @@ -27,6 +32,13 @@ climate: - "off" input_number: + toshiba_heat_temp: + name: AC heat temp + unit_of_measurement: "潞C" + min: 24 + max: 30 + step: 1 + icon: mdi:air-conditioner toshiba_cool_temp: name: AC cool temp unit_of_measurement: "潞C" @@ -43,11 +55,13 @@ input_number: icon: mdi:air-conditioner script: - toshiba_ac_toggle_cool: + toshiba_ac_toggle: sequence: - service: >- - {% if is_state('climate.toshiba_ac', 'off') %} + {% if is_state('climate.toshiba_ac', 'off') and is_state('input_boolean.ac_heating', 'off') %} script.toshiba_ac_on_cool + {% elif is_state('climate.toshiba_ac', 'off') and is_state('input_boolean.ac_heating', 'on') %} + script.toshiba_ac_on_heat {% else %} climate.turn_off {% endif %} @@ -76,7 +90,32 @@ script: - service: logbook.log data: name: "馃挩 Climate Module 路 " - message: "AC 路 Switching on" + message: "AC 路 Switching on 路聽Cool" + domain: climate + + toshiba_ac_on_heat: + 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: "heat" + - delay: "00:00:01" + - 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_template: + temperature: "{{ states('input_number.toshiba_heat_temp') | default(26) }}" + - service: logbook.log + data: + name: "馃挩 Climate Module 路 " + message: "AC 路 Switching on 路 Heat" domain: climate toshiba_ac_on_cool_if_hot: diff --git a/config/packages/devices/living_room/wallmote.yaml b/config/packages/devices/living_room/wallmote.yaml index e07b14b..c964612 100644 --- a/config/packages/devices/living_room/wallmote.yaml +++ b/config/packages/devices/living_room/wallmote.yaml @@ -88,7 +88,7 @@ automation: scene_id: 4 scene_data: 0 action: - - service: script.toshiba_ac_toggle_cool + - service: script.toshiba_ac_toggle - alias: Wallmote 路聽Living room 路 4 路 Hold 路 Toggle Cover trigger: