Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor unit of measurement should use ISO 4217 monetary format #37

Open
3v1n0 opened this issue Dec 4, 2021 · 1 comment
Open

Sensor unit of measurement should use ISO 4217 monetary format #37

3v1n0 opened this issue Dec 4, 2021 · 1 comment

Comments

@3v1n0
Copy link

3v1n0 commented Dec 4, 2021

As per documentation the sensor should set the native_unit_of_measurement as EUR/kWh and not as €/kWh.

In theory this would be required to get the sensor working as price source in the Energy panel, but still this doesn't seem to work in my case.

@azogue
Copy link
Owner

azogue commented Dec 20, 2021

Hi @3v1n0,

I'm not sure about that 🧐. Docs point to ISO 4217 for type 'monetary', but the sensor has a composed unit: 'monetary / energy'.

I suppose that kind of unit arithmetic will be implemented sometime, but I think right now is not working as expected, and, in addition, the PVPC sensor is not defining a device_class attribute, as the current implementation is old and doesn't use 'devices', just a plain SensorEntity, so it wouldn't apply here, but thanks for pointing it out 👍

About the Energy panel integration:

In theory this would be required to get the sensor working as price source in the Energy panel, but still this doesn't seem to work in my case.

I didn't make any changes because it works for me as it is, by selecting the sensor as price source when configuring entities for the Energy panel, and I think for other users too.

ha-energy-select-price-entity

ha-energy-panel-with-cost

Could you elaborate your problem? Don't you see the sensor.pvpc listed in the configuration panel?

Anyway, I'll try to pay attention for those evolving device classes so the sensor works optimally with HA 🤟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants