Giter VIP home page Giter VIP logo

Comments (15)

oyvindwe avatar oyvindwe commented on September 18, 2024 1

It turned out t_beep is not really a status property, it's a field you send with other message to enable/disable beeping when controlling the device. I'm guessing your heat pump currently beeps every time Home Assistant sends it a command.

See PR #81 for how to turn that off (included in version 0.12.0)

from connectlife-ha.

oyvindwe avatar oyvindwe commented on September 18, 2024

But not water_heater entity is added. Any idea?

That entity type is not support yet. It is very similar to climate, so should be easy to add

from connectlife-ha.

bartashevich avatar bartashevich commented on September 18, 2024

Problem is that climate doesn't accept modes such as heat_pump, electric, performance:

  - property: t_work_mode
    water_heater:
      target: operation_list
      options:
        8: eco
        9: heat_pump
        11: performance
        12: electric

from connectlife-ha.

bartashevich avatar bartashevich commented on September 18, 2024

Ah, I understand now what you mean by not being supported. This addon doesn't have water_heater.py.

If I use climate.py as a template for water_heater.py, do you think that will be enough to make it work?

from connectlife-ha.

oyvindwe avatar oyvindwe commented on September 18, 2024

Is the fan only on/off?

from connectlife-ha.

oyvindwe avatar oyvindwe commented on September 18, 2024

If I use climate.py as a template for water_heater.py, do you think that will be enough to make it work?

I'm already working on it :)

from connectlife-ha.

oyvindwe avatar oyvindwe commented on September 18, 2024

state is a bit tricky to map, as it cannot be mapped 1-1. We need a new top-level mapping that can map a target property to a set of device properties. I have a similar problem with climate.preset that I am working on.

For now I propose to just map t_power to state and t_eco to a separate switch [Edit: does not support t_eco]. But what is the "on" state for your heat pump? It must be one of the states here: https://developers.home-assistant.io/docs/core/entity/water-heater#states

from connectlife-ha.

oyvindwe avatar oyvindwe commented on September 18, 2024

Also we can have self defined values for current_operation - or is this the correct mapping comparing with the ConnectLife app?

  - property: t_work_mode
    water_heater:
      target: current_operation
      options:
        8: eco
        9: heat_pump
        11: performance
        12: electric

from connectlife-ha.

oyvindwe avatar oyvindwe commented on September 18, 2024

I have added support for water_heater in version 0.8.0, see PR #46.

I ended up mapping t_power to a switch, as enabling WaterHeaterEntityFeature.ON_OFF did not make any on/off switch turn up on the UI. This feature is not documented on https://developers.home-assistant.io/docs/core/entity/water-heater#states either. I also did not get _attr_state to work.

I have a feeling that the water heater entity needs some love and care in the core repo.

I would still like some feedback on the t_work_mode mapping. I added 0: "off" as an option as well.

from connectlife-ha.

bartashevich avatar bartashevich commented on September 18, 2024

Thanks for adding, I'll test it in a bit. I'll add more info about modes and fan:

Set modes:
t_work_mode: 8 - AUTO, 9 - ECO, 11 - FAST, 12 - ELECTRICHEATING
t_power: 0/1
t_air: 0/1 <- does the same as t_fan_speed
t_fan_speed: 0/1 <- does the same as t_air
...

Read values:
f_electric_heating: 0 - OFF/ECO/AUTO, 1 - ELECTRICHEATING/FAST
f_heat_pump: 0 - OFF, 1 - ELECTRICHEATING, 2 - ECO/AUTO/FAST

About t_power, I think it works the same way as airconditioner.

Currently using Bilan addon with my custom changes I got to this:
image

image

image

from connectlife-ha.

bartashevich avatar bartashevich commented on September 18, 2024

Thank you very much!

Just tested and all is working perfectly, except:

  • Off within mode selection does nothing.
  • Changing temperature range to 20-65C
  • t_air and t_fan_speed are redundant, doing same thing. Might as well only keeping t_air
  • t_beep for some reason, beeps when activating, but then disables by it self. Probably something wrong with device it self.

Is it possible to create metering entity to actually obtain consumed energy? Because the sensor that comes from API always stays at 0, even in the app.

From API when f_heat_pump = 2, it uses heat_pump and if f_electric_heating = 1 it uses electric heater, since I know that Heat pump uses 750W and electric heater 2050W, it seems possible to obtain cumulative value. FIY, it is possible f_heat_pump = 2 and f_electric_heating = 1, consuming total of 2800W.

Pictures:
image
image
image
image

from connectlife-ha.

oyvindwe avatar oyvindwe commented on September 18, 2024

@bartashevich Thank you for your feedback! I will look into the off mode - that should be a quick fix (still only on/off)

From API when f_heat_pump = 2, it uses heat_pump and if f_electric_heating = 1 it uses electric heater

So mode should be mapped to multiple properties, similar to preset for ClimateEntity. This is work in progress, and will take a few days.

The WaterHeaterEntity puzzles me a bit though. I am not able to view state of mode in my HA (I am running against a test server that emulates the ConnectLife API).

Is it possible to create metering entity to actually obtain consumed energy? Because the sensor that comes from API always stays at 0, even in the app.

This should not be built into the integration itself, but it should be possible to create a template sensor that calculates. it.

from connectlife-ha.

oyvindwe avatar oyvindwe commented on September 18, 2024

What happens with t_work_mode when you turn it off? Does it go to 0, or does it remain at the previous value?

from connectlife-ha.

bartashevich avatar bartashevich commented on September 18, 2024

This should not be built into the integration itself, but it should be possible to create a template sensor that calculates. it.

Maybe it is for the best. Since daily_energy_kwh sensor exists from API, just with the wrong value. I was think about possibility of making it functional.

What happens with t_work_mode when you turn it off? Does it go to 0, or does it remain at the previous value?

t_work_mode remain with the previous value

from connectlife-ha.

oyvindwe avatar oyvindwe commented on September 18, 2024

This should be fixed in version 0.9.0

from connectlife-ha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.