Tidone / homeassistant_eta_integration

Integration of ETA (Heating) sensors and switches to home assistant
MIT License
21 stars 1 forks source link

Support for "Schieber" write operation #2

Closed greentux closed 9 months ago

greentux commented 10 months ago

The user/menu in the 1.1 issue was not complete. There is an additional value "Schieber" which is an offset for the "Heizkurve-" value. So it is possible to correct the "Heizkurve" for some reasons (party etc.). My XML for "Heizkreis":

`

` Please support "Schieber" and also for write operation. So it could be possible to have some logic to change the value. The description is ` 140 ` So it is necessary to multiply with 10 for writing and divide with 10 for reading.
Tidone commented 10 months ago

Hi,

Could you post your complete user/menu output? That would make testing a bit easier.

Reading the value should already work because the unit is %, which is supported by the float sensor.

There are two possible ways to implement write operations:

  1. I could use a number entity in box mode. The problem with this approach is that the number entity needs a min and max value, which I can't read from the ETA terminal with API 1.1, but I could set the min and max values to arbitrary small and large values to bypass this problem.
  2. I could implement a custom service, which can be used in automations to write the value. The user then has to create his own input number helper, and add an automation to read the value from the helper and call the respective service of my integration. That way the user has to supply the min and max values.

Option 1 would be less of a hassle to implement, but IMO it would be more dangerous because the user could make his heating unit inoperable (or even damage it) by setting a sensor to an invalid value.

I think option 2 is better because the user has to actively call a service to set a value, and can't involuntarily set the value in his dashboard.

What do you think?

Regardless of the option, the implementation should be ready sometimes next week.

greentux commented 10 months ago

I like option 1. Its not dangerous for the heater. Its only a offset from -100 to 100%. This is usally a gap from -3K to + 3 K of the "Vorlauftemperatur". So its easy.

Tidone commented 10 months ago

If I would only implement writing to this single endpoint, then option 1 would be better, yes. But if I'm already implementing the write functionality, I do it for every possible sensor, and not for a single, hardcoded, one.

I will do some tests to see which option is easier and works better.

Could you please post the output of user/menu (on Pastebin) to make testing easier?

greentux commented 10 months ago

https://pastebin.com/NeQSaU7W

Every configuration has its own xml. I have the configuration without buffer.

Tidone commented 9 months ago

Hi, I just published a new version with writable sensors. You can reconfigure the integration to add the new sensors to HA. The first time after clicking on that button will take a while because the integration will have to populate the list of writable sensors.

The writable sensors are all defined as configuration entities, and therefore won't be shown on the lovelace dashboard by default. You either have to go to the device page, or create a manual dashboard and add the sensors there.

greentux commented 9 months ago

works like a charme. thx.