[Closed] Expose previousValue in ZwaveJS

I have a Fortrezz Zwave water flow meter(product, device info). It reports cumulative water consumption only, but it is nice to have a view of water flow over time. I was able to get this with open zwave, because a sensor was created for the “previousValue”. With the ZwaveJS integration, a sensor is only created for the latest flow value. I do see the other values in the zwaveJS logs:

2021-03-23 14:49:47.261 INFO ZWAVE: Node 4: value updated: 50-0-value-197121 127685.3 => 127685.3
2021-03-23 14:49:47.263 INFO ZWAVE: Node 4: value updated: 50-0-previousValue-197121 127684 => 127685.3
2021-03-23 14:49:47.265 INFO ZWAVE: Node 4: value updated: 50-0-deltaTime-197121 60 => 60

2021-03-23 14:56:46.520 INFO ZWAVE: Node 4: value updated: 50-0-value-197121 127685.3 => 127685.4
2021-03-23 14:56:46.522 INFO ZWAVE: Node 4: value updated: 50-0-previousValue-197121 127685.3 => 127685.3
2021-03-23 14:56:46.524 INFO ZWAVE: Node 4: value updated: 50-0-deltaTime-197121 60 => 419

I’d like to either get delta and previousValue broken out into sensors, or maybe even better, added as attributes onto the value sensor.

I’m using the ZwaveJS2Mqtt add-on version 0.8.1, ZwaveJS2Mqtt version 2.4.1, and zwave-js 6.6.3.

Actually, it appears these two values have been removed from the latest version of node-zwave-js. This means a future HA release cannot provide them as entities, nor will they be available in zwavejs2mqtt. See release notes and corresponding PR.

The deltaTime and previousValue values for the Meter CC are no longer exposed

Perhaps other sensor integrations, like statistics, integration, or the full-blown utility meter would substitute?

I’ve been trying to use the derivative component, but it has not been completely accurate. It misses updates occasionally, which is obvious when the flow went to 0 a while ago. I guess I’ll try and debug that.

Thanks,