wimb0 / home-assistant-saj-r5-modbus

Home Assistant Component for reading data locally from SAJ R5 (and Zonneplan One) Inverters through modbus TCP.
MIT License
33 stars 14 forks source link

Report power factor as persentage #51

Closed fsaris closed 3 years ago

fsaris commented 3 years ago

HA expects power factor in %. When in % the history is shown as a graph

Followup of #50

wimb0 commented 3 years ago

That is weird. Power factor is something in a range from -1.0 to 1.0. The unit for this is φ (cos-phi), it is not a percentage of something.

fsaris commented 3 years ago

Okay, I see that measurement to for other components. Will dive into this next days/week.

The % value was based on https://www.home-assistant.io/integrations/sensor/#device-class

fsaris commented 3 years ago

Your correct the % was added to get tests green and because HA needs a unit to recognize the value as a numeric value. But value should be as is.

Think will add the (space) as temp workaround to get the graphs in HA.

For reference:

fsaris commented 3 years ago

Some more insides on this https://github.com/home-assistant/architecture/discussions/503

fsaris commented 3 years ago

New approach with temporary workaround for missing HA core functionality see #55