This is an working solution using climate_template and you would like to convert water_cooler to climate entity in order to show it on UI:
## SmartThings integration Heat pump Boiler conversion to climate template
- platform: climate_template
unique_id: samsung_boiler
name: Samsung Boiler
modes:
- "heat"
- "off"
preset_modes:
- "eco"
- "home"
- "comfort"
- "boost"
min_temp: 30
max_temp: 50
temp_step: 0.5
current_temperature_template: "{{ state_attr('water_heater.boiler', 'current_temperature') }}"
target_temperature_template: "{{ state_attr('water_heater.boiler', 'temperature') }}"
hvac_action_template: >
{% set mode = state_attr('water_heater.boiler', 'operation_mode') %}
{% set valve = states('sensor.soojuspump_klapi_asend') %}
{% if mode == "off" %}
{% set status = "off" %}
{% elif valve == "room" %}
{% set status = "idle" %}
{% elif valve == "tank" %}
{% set status = "heating" %}
{% endif %}
{{ status }}
hvac_mode_template: >
{% set mode = state_attr('water_heater.boiler', 'operation_mode') %}
{% set status = "off" %}
{% if mode in ("unavailable", "unknown", "off") %}
{% set status = "off" %}
{% elif mode in ("eco", "heat_pump", "performance", "high_demand") %}
{% set status = "heat" %}
{% endif %}
{{ status }}
preset_mode_template: >
{% set mode = state_attr('water_heater.boiler', 'operation_mode') %}
{% if mode in ("unavailable", "unknown") %}
{% set status = "eco" %}
{% elif mode == "heat_pump" %}
{% set status = "home" %}
{% elif mode == "performance" %}
{% set status = "comfort" %}
{% elif mode == "high_demand" %}
{% set status = "boost" %}
{% elif mode == "eco" %}
{% set status = "eco" %}
{% endif %}
{{ status }}
set_hvac_mode:
- service: water_heater.set_operation_mode ## for Samsung boiler
data:
entity_id: water_heater.boiler
operation_mode: >
{% set mode = hvac_mode %}
{% set state = "off" %}
{% if mode == "off" %}
{% set state = "off" %}
{% elif mode == "heat" %}
{% set state = "heat_pump" %}
{% endif %}
{{ state }}
set_preset_mode:
- service: water_heater.set_operation_mode
data:
entity_id: water_heater.boiler ## for Samsung boiler
operation_mode: >
{% set mode = preset_mode %}
{% if mode == "eco" %}
{% set state = "eco" %}
{% elif mode == "home" %}
{% set state = "heat_pump" %}
{% elif mode == "comfort" %}
{% set state = "performance" %}
{% elif mode == "boost" %}
{% set state = "high_demand" %}
{% endif %}
{{ state }}
set_temperature:
- service: water_heater.set_temperature ## for Samsung boiler
data:
entity_id: water_heater.boiler
temperature: "{{ temperature }}"
here is a example of converting the samsung heatpump into new climate_template to give hvac actions on the UI to follow the same behaviour as the water_heater:
## Samsung Heat Pump conversion to custom climate_template
- platform: climate_template
unique_id: samsung_heat_pump_adjusted
name: Samsung Soojuspump adjusted
modes:
- 'off'
- 'auto'
- 'cool'
- 'heat'
min_temp_template: "{{ state_attr('climate.samsung_soojuspump', 'min_temp') }}"
max_temp_template: "{{ state_attr('climate.samsung_soojuspump', 'max_temp') }}"
temp_step: 0.5
hvac_mode_template: "{{ states('climate.samsung_soojuspump') }}"
current_temperature_template: "{{ state_attr('climate.samsung_soojuspump', 'current_temperature') }}"
target_temperature_template: >
{% set mode = states('climate.samsung_soojuspump') %}
{% set temperature = state_attr('climate.samsung_soojuspump', 'temperature') %}
{% if mode == 'auto' %}
{% set temperature = unavailable |float %}
{% elif mode == 'off' %}
{% set temperature = unavailable |float %}
{% endif %}
{{ temperature }}
hvac_action_template: >
{% set mode = states('climate.samsung_soojuspump') %}
{% set temperature = state_attr('climate.samsung_soojuspump', 'current_temperature') | float(0) %}
{% set target = state_attr('climate.samsung_soojuspump', 'temperature') | float(0) %}
{% set valve = states('sensor.soojuspump_klapi_asend') %}
{% set status = none %}
{% if mode == 'heat' %}
{% if temperature > target or valve == 'tank' %}
{% set status = 'idle' %}
{% else %}
{% set status = 'heating' %}
{% endif %}
{% elif mode == 'cool' %}
{% if temperature < target or valve == 'tank' %}
{% set status = 'idle' %}
{% else %}
{% set status = 'cooling' %}
{% endif %}
{% elif mode in ['off', 'auto'] %}
{% set status = none %}
{% endif %}
{{ status }}
set_hvac_mode:
- service: climate.set_hvac_mode
data:
entity_id: climate.samsung_soojuspump
hvac_mode: "{{ hvac_mode }}"
set_temperature:
- service: climate.set_temperature ## for Samsung boiler
data:
entity_id: climate.samsung_soojuspump
temperature: "{{ temperature }}"
In this example I used smart things integration and my heat pump is connected to internet using the samsung wifi-kit
This is the result I got:
In off mode and Auto mode the temperature setpoint is not shown and setpoints cannot be adjusted
The Home and Away buttons are made with custom:button_card using some helpers and automations