mathieu-mp / homeassistant-intex-spa

Home Assistant integration for Intex Spa
https://github.com/mathieu-mp/homeassistant-intex-spa
MIT License
32 stars 6 forks source link

Missing idle state for heater #46

Closed jaroslav-fedor-swi closed 1 year ago

jaroslav-fedor-swi commented 1 year ago

Is your feature request related to a problem? Please describe.

With current implementation you don't see how long the heater runs in order to keep target temperature. It is shown as it heat all time when it is on.

Describe the solution you'd like

When target temp is achieved, thermostat gets to idle state.

Describe alternatives you've considered

Template switch and climate can get this functionality:

switch
  - platform: template
    switches:
      spa_heat:
        value_template: "{{ is_state('climate.spa', 'heat') }}"
        turn_on:
          service: climate.turn_on
          target:
            entity_id: climate.spa
        turn_off:
          service: climate.turn_off
          target:
            entity_id: climate.spa
climate:
  - platform: generic_thermostat
    name: SPA_Custom
    heater: switch.spa_heat
    target_sensor: sensor.spa_current_temperature
    max_temp: 40
    min_temp: 20
    target_temp: 37
    precision: 1
mathieu-mp commented 1 year ago

Hi @jaroslav-fedor-swi, This integration aims at connecting the spa and provide home assistant with data retrieved from the spa. However, this heat/idle effective state is not provided by the data retrieved from the spa. We might optimistically assume the real state, but there are many parameters missing: the spa internal thermostat algorithm and parameters are unknown, and the provided water temperature precision level is certainly lower than the one the spa internal thermostat has access to. Hence, assuming the real state would lead to a significant error in the value provided, and this is why I will not implement this feature. Nevertheless, as you suggested, you could use a climate template to get a general idea of the spa heat/idle state, just remember it will not provide a reliable status. A reliable status could be retrieved by measuring the spa consumed power: each component of the spa unit has its own consumption and we can deduct what is currently used. Heater is around 2kW.