I have a zigbee 3 phase inline power meter installed, I have a problem that the current energy consumed isn’t the actual consumed energy that is reported to the energy providers meter… the meter came before the zigbee meter… is there any way of updating the state of the meter from 100 that’s currently used to 400 that is on the meter (example) ? I checked via DB if I can change it, I can but that’s one time and the next time it’ll just pull the info from the meter again and will not match the main power meter…
Friendly name - PowerMeter
Description
Last seen - N/A
Availability - Disabled
Device type - Router
Zigbee Model - TS0601
Zigbee Manufacturer - _TZE200_bkkmqmyo
Description - Single phase DIN-rail energy meter with switch function
Support status - Supported
IEEE Address - 0x943469fffec954e8
Network address - 0x4DE0
Manufacturer - Hiking
Model DDS238-2
Power Interview completed - True
I am setup with Zigbee2MQTT, reports correctly (mostly) unfortunately it doesn’t pickup the configurations entirely, not sure if it has everything exposed.
The attribute will change multiple times a day based on kWh usage. I believe it polls every 30secons or so.
I don’t know if there is an option to write to the device (I somehow doubt it) so maybe it would be simpler to just change the information it reports back from value to value + 300 kwh or something like that…
Not sure if this is your model or not, but if it is … ‘can’t reset to zero’ not a good sign here
I think there should be a way to create some type of ‘template’ sensor in Home Assistant that will allow you to apply some type of ‘offset’ to the value coming in and expose this as a new sensor. I’ve not done this, but do some searching and maybe a new query here on this forum. There are some real gurus that can advise on tools to tweak sensors here. Good hunting!
In thinking a bit more, I kind of have done things to modify incoming sensor values. Here is an example that might give you are start. This is a zigbee2mqtt temperature sensor that the temperature value comes in as degrees C and being a yank I have to have degrees F
your JSON attribute is value_json.energy I think. And your value template might something like:
I’m making a big assumption that you do not need a variable offset based on time or something, if so then you need help from some folks with a higher pay grade.
Honestly I thought as much, and that’s the difficulty in this, that for this to make sense for me I would want the sensor to reflect realistic mai meter usage (or what it says it should be). It’s not as much resetting to zero as changing it’s value to something else… I don’t know how the vendor didn’t think of this…
Offset was what I was thinking… just not sure where the offset would be…
I don’t know if it would be energy since energy is picking up the values from the 3 phase meter… but I do think this is the way to go, a good direction. No need for anything like time based offset, just an offset on what it’s reading
Thanks David, the direction you went with float(0) + count was the simplest. and it’s doing exactly what I wanted… well kind of but it does the job… thanks a lot
I also confirmed, that it is not possible to write to the meter, and no meter allows for this… which is in my opinion silly since it would make sense to have the same reading on both meters… oh well.
Thanks David! this helped me a lot and I am not a little smarter with HA potential
For reference for anyone looking at how to create the sensor, this is the easiest option.