Devotics / heatzy-home-hassistant

Climate Home Assistant component for Heatzy Pilot
MIT License
24 stars 20 forks source link

Improve controls and user experience #7

Closed Dramloc closed 3 years ago

Dramloc commented 5 years ago

As mentioned in issue #6, the Home Assistant component used for this project provides too many controls for the Heatzy Pilot : temperature display and control do not work as the Heatzy Pilot only support HVAC presets.

We should find a way to disable or hide these features to keep the component small and easy to use.

Another solution would be to find another Home Assistant platform that better fit the capabilities of the Heatzy Pilot.

I will try to find some solutions that work with the latest Home Assistant releases.

Ideas and inspirations are welcomed!

Dramloc commented 4 years ago

The default Home Assistant component does not seem flexible enough. The way to go might be to implement a custom lovelace card for the Heatzy Pilote. It could look something like this:

Card

Buttons on the right will control the Pilote's preset (Off, Comfort, Eco and Away) and highlight the active preset.

This could also support multiple Pilotes in a single card:

Card multiple entities

And lovelace configuration could look like this:

type: 'custom:heatzy-pilote-card'
entities:
  - climate.salon
  - climate.chambre

I will try to implement this after digging a bit into lovelace.

Let me know what you think!

xdev-x commented 4 years ago

Sounds great and it's look very nice !

cbastienbaron commented 4 years ago

can't wait to see it :)

sebastien-k commented 4 years ago

I'm trying to control my heaters with heatzy, but I haven't succeeded yet (I'm very new to Home Assistant, sorry if I made stupid mistakes).

I used this dedicated heatzy thermostat made by @benaisn instead of the home Assistant generic thermostat : https://github.com/benaisn/heatzy_thermostat

So I defined my switch in configuration.yaml :

switch:
  - platform: template
    switches:
      radiateur_salle_de_bains:
        friendly_name: 'Radiateur Salle de Bains'
        icon_template: mdi:radiator
        value_template: "{{ is_state_attr('climate.salle_de_bains', 'operation_mode', 'heat') }}"
        turn_on:
          service: climate.set_operation_mode
          data:
            entity_id: climate.salle_de_bains
            operation_mode: 'heat'
        turn_off:
          service: climate.set_operation_mode
          data:
            entity_id: climate.salle_de_bains
            operation_mode: 'eco'

Then I defined my generic_thermostat in my configuration.yaml using that previous switch, as recommended by @benaisn :

platform: generic_thermostat
  name: Thermostat Salle de Bains
  heater: switch.radiateur_salle_de_bains
  target_sensor: sensor.temperature_salle_de_bains
  min_temp: 17
  max_temp: 22
  ac_mode: false
  target_temp: 20
  initial_hvac_mode: "off"
  away_temp: 16
  hot_tolerance: 0

I made this card in my ui-lovelace.yaml :

    - type: thermostat
      entity: climate.thermostat_salle_de_bains

I obtain this:

image

this seems great BUT:

Even if I select higher temperature than current temp, like this:

image

(I want to reach 21.5 while it is actually 17.8), nothing happens, I was expecting my heater would turn on. But I might be wrong, so ok.

BUT:

if I press the "fire" icon, I obtain this:

image

and it says my heater is "Idle". I was expecting "Heating" instead. Moreover, Home Assistant has no effect on the real heater.

So I don't understand what's wrong with my config, can someone help me?

Thanks in advance!

benaisn commented 4 years ago

@sebastien-k the preset modes have changed (I think last year) now they are preset_modes: none,comfort,eco,away So you need to replace 'heat' by 'comfort'

like that :


  - platform: template
    switches:
      chauffage_salle_de_bain:
        friendly_name: 'Chauffage Salle de Bain'
        icon_template: mdi:radiator
        value_template: "{{ is_state_attr('climate.salle_de_bain', 'preset_mode', 'comfort') }}"
        turn_on:
          service: climate.set_preset_mode
          data:
            entity_id: climate.salle_de_bain
            preset_mode: 'comfort'
        turn_off:
          service: climate.set_preset_mode
          data:
            entity_id: climate.salle_de_bain
            preset_mode: 'away'
  - platform: generic_thermostat
    name: Thermostat Salle de Bain
    heater: switch.chauffage_salle_de_bain
    target_sensor: sensor.oregon_salle_de_bain_temperature
    min_temp: 14
    max_temp: 22
    ac_mode: false
    target_temp: 18
    min_cycle_duration:
      seconds: 60
    away_temp: 14
    hot_tolerance: 0
    cold_tolerance: 0
    precision: 0.1
sebastien-k commented 4 years ago

@benaisn

Thank you! It works!

I made several mistakes, the one you said (replace 'heat' by 'comfort'), but also I had to replace 'operation_mode' by 'preset_mode'.

Thank again!

omolko commented 4 years ago

Hello thanks for the job done here. I am very new with HA At the moment I have my folder heatzy in custom_component, in my config.yaml I have put climate: platform: heatzy username: "olivier@*" password: "J**8" What should I do next? Thanks

bikerman51 commented 3 years ago

The default Home Assistant component does not seem flexible enough. The way to go might be to implement a custom lovelace card for the Heatzy Pilote. It could look something like this:

Card

Buttons on the right will control the Pilote's preset (Off, Comfort, Eco and Away) and highlight the active preset.

This could also support multiple Pilotes in a single card:

Card multiple entities

And lovelace configuration could look like this:

type: 'custom:heatzy-pilote-card'
entities:
  - climate.salon
  - climate.chambre

I will try to implement this after digging a bit into lovelace.

Let me know what you think!

Hi !

Do you have done this card ?

DanChaltiel commented 3 years ago

Hi,

This integration is so awesome that I learned HomeAssistant integration just to make the above-mentioned card.

You can find it here: https://github.com/DanChaltiel/heatzy-pilote-card

image

@Dramloc any review or suggestion would be more than welcome!

Dramloc commented 3 years ago

Hi @DanChaltiel, Thank you for your work, this seems awesome!

Dramloc commented 3 years ago

Hi,

Sorry for the delay on this issue, I won't have much time for this project in the future. If anyone wants a custom card for the Heatzy Pilot, you can use the project created by @DanChaltiel: https://github.com/DanChaltiel/heatzy-pilote-card.

You can also create your own lovelace card if you want to customize the behavior. Here is a simple card example created using the lovelace editor:

image

type: vertical-stack
cards:
  - type: entity
    entity: climate.salon
    attribute: preset_mode
    icon: 'hass:none'
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: call-service
          service: climate.set_preset_mode
          service_data:
            preset_mode: none
            entity_id: climate.salon
        entity: climate.salon
        show_state: false
        show_name: false
        show_icon: true
        icon: 'hass:do-not-disturb'
        hold_action:
          action: none
        icon_height: 24px
      - type: button
        tap_action:
          action: call-service
          service: climate.set_preset_mode
          service_data:
            preset_mode: comfort
            entity_id: climate.salon
        entity: climate.salon
        show_name: false
        icon_height: 24px
        hold_action:
          action: none
        show_state: false
        icon: 'hass:white-balance-sunny'
      - type: button
        tap_action:
          action: call-service
          service: climate.set_preset_mode
          service_data:
            preset_mode: eco
            entity_id: climate.salon
        entity: climate.salon
        icon: 'hass:leaf'
        show_name: false
        hold_action:
          action: none
        icon_height: 24px
      - type: button
        tap_action:
          action: call-service
          service: climate.set_preset_mode
          service_data:
            preset_mode: away
            entity_id: climate.salon
        entity: climate.salon
        icon: 'hass:snowflake'
        show_name: false
        hold_action:
          action: none
        icon_height: 24px