Baldhor / Homey-ESPhome-Enhanced

This is an Homey app which adds support for ESPHome devices. ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. More information on their homepage: https://www.esphome.io/
GNU General Public License v3.0
4 stars 3 forks source link

Decimal configuration seems ignored #9

Closed Baldhor closed 10 months ago

Baldhor commented 10 months ago
          Not sure if related, but the amount of decimal places seems to be ignored entirely?

According to the log on my ESPHome/slimmelezer it is reporting these values with these decimals of accuracy:

13:47:53    [D] [sensor:093]    'Power Consumed Phase 1': Sending state 0.48100 kW with 3 decimals of accuracy
13:47:53    [D] [sensor:093]    'Energy Consumed Tariff 1': Sending state 3375.22803 kWh with 3 decimals of accuracy
13:47:53    [D] [sensor:093]    'Energy Consumed Tariff 2': Sending state 3789.25708 kWh with 3 decimals of accuracy

However, in the Homey web app (in the browser) there are less decimals: image (Only 2 instead of the 3 it should display?)

And the iPhone app is even more confused: image (I'm not even going to count the amount of decimals there)

I have nothing specific set in the ESPHome config about the decimals; This is how I set the device up on the Homey: image

(The screenshots and the log snippet were taken at different moments, therefore the actual values don't match)

Originally posted by @aedens78 in https://github.com/Baldhor/Homey-ESPhome-Enhanced/issues/4#issuecomment-1667722223

Baldhor commented 10 months ago

@aedens78 fixed in master image

Baldhor commented 10 months ago

I will try to fix this before publishing image

Not related, but found it while fixing decimals

as for the little story, homey was expecting a number (integer), but the code used to set a string ...

Baldhor commented 10 months ago

Version 0.3.4 published, awaiting certification https://homey.app/fr-fr/app/nl.inversion.esphome/ESPhome/test/

Baldhor commented 10 months ago

@aedens78 it is published. Can you confirm it is fixed?

aedens78 commented 10 months ago

@Baldhor Yes! Looks to be fixed; both the webclient and the iPhone app now show the configured decimals! (I did remove the device, remove and reinstall the app, and re-added the device to force the update, and now all is well)

image image

Thank you very much for the fast support and the fix! :)

Baldhor commented 10 months ago

(I did remove the device, remove and reinstall the app, and re-added the device to force the update, and now all is well) Yeah it would be cool to update capabilities options on reconnection. Re pairing the device break existing flows ...