Climate object configuration for HomeAssistant
I just want to share my configuration to get the SPA as a climate object in HomeAssistant, hopefully it is useful for somebody else. I have been using it for a while now and it is working well.
mqtt:
climate:
- name: "Drop SPA MQTT"
unique_id: drop_spa_mqtt
precision: 0.5
min_temp: 10
max_temp: 40
temp_step: 0.5
modes:
- 'off' # rest, ready_in_rest
- auto # ready
preset_modes:
- "low"
- "high"
preset_mode_state_topic: "homie/bwa/spa/temperature-range"
preset_mode_command_topic: "homie/bwa/spa/temperature-range/set"
mode_state_topic: "homie/bwa/spa/heating-mode"
mode_state_template: >-
{% set values = { 'ready':'auto', 'rest':'off', 'ready_in_rest':'off'} %}
{{ values[value] if value in values.keys() else 'off' }}
mode_command_topic: "homie/bwa/spa/heating-mode/set"
mode_command_template: >-
{% set values = { 'heat':'ready', 'off':'rest'} %}
{{ values[value] if value in values.keys() else 'rest' }}
current_temperature_topic: "homie/bwa/spa/current-temperature"
temperature_state_topic: "homie/bwa/spa/target-temperature"
temperature_command_topic: "homie/bwa/spa/target-temperature/set"
Also I was wondering if it is possible somehow to expose some parameters from ELFIN, like IP Adress and RSSI. I have been struggling to have a stable wifi connection and having those exposed would help troubleshooting.
@cristimi
I was just wondering about this exact thing. I am assuming this goes in the usual configuration.yaml?
And does this work with the latest climate card that provides max and min value input?
Made some updates to the above Climate Object:
- Updated so it shows when the Spa is heating
- Added the Pump functions using the Fan function of the Climate Object
- Not sure if something changed but it seems the original yaml had an error setting the "Mode" and would crap itself if I tried to change the mode
I was only able to make it Blue by setting up a up a Lovelace Theme- not sure how to add color options to the MQTT Climate Yaml.
### Hot Tub Custom Climate Object
mqtt:
climate:
- name: "Hot Tub Climate Control"
unique_id: hot_tub_control_mqtt
icon: mdi:hot-tub
precision: 1
min_temp: 80
max_temp: 104
temp_step: 1
modes:
- 'off' # rest, ready_in_rest
- auto # ready
mode_state_topic: "homie/bwa/spa/heating-mode"
mode_state_template: >-
{% set values = { 'ready':'auto', 'rest':'off', 'ready_in_rest':'off'} %}
{{ values[value] if value in values.keys() else 'off' }}
mode_command_topic: "homie/bwa/spa/heating-mode/set"
mode_command_template: >-
{% set values = { 'auto':'ready', 'off':'rest'} %}
{{ values[value] if value in values.keys() else 'rest' }}
preset_modes:
- "low"
- "high"
preset_mode_state_topic: "homie/bwa/spa/temperature-range"
preset_mode_command_topic: "homie/bwa/spa/temperature-range/set"
current_temperature_topic: "homie/bwa/spa/current-temperature"
temperature_state_topic: "homie/bwa/spa/target-temperature"
temperature_command_topic: "homie/bwa/spa/target-temperature/set"
action_topic: "homie/bwa/spa/heating"
action_template: >-
{% set values = { 'true':'heating'} %}
{{ values[value] if value in values.keys() else 'idle' }}
fan_modes:
- "Auto/Off"
- "low"
- "high"
fan_mode_command_topic: "homie/bwa/spa/pump1/set"
fan_mode_command_template: >-
{% set values = { 'Auto/Off':'0', 'low':'1', 'high':'2' } %}
{{ values[value] if value in values.keys() else '1' }}
Really nice work, that looks great!