Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
MySensors energy meter sensors Watt and kWh switch values sometimes after restart #7018
Home Assistant release (
Python release (
Description of problem:
This has been around for a bit, first I thought it was an issue in emon cms (I use the emoncms history plugin for nicer energy visualization), but as you can see before the reboot, I had immense power usage the last days, since the kWh was reported as Watt value...
You can work around this by using different child ids for the different value types, Watt vs kWh.
A fix would mean adding the value type to the entity id. Id clashes could still occur in that case though when there are more than one gateway and identical sensors on multiple gateways.
Thanks. I also thought about a workaround using template sensors, since both contain the complete information, I can use the attributes to create a template which always contains the correct data.
I do like the fix though to make the id more "unique", since I think it might happen in other cases as well, i.e. in Temp/Hum sensors.