-
I'm working on adding support for a robot vacuum and trying to figure out how to convert the "time used" into "time remaining" sensor Specifically I have dpid for vacuum consumables that are tracking their lifetime in seconds and this value is increasing. Tuya app displays time remaining in hours which is a more practical way to display the time. The obvious way is a new template sensor in HA that would subtract the current value from the consumable lifetime but I'd like to replicate that in the device config to make configuration straightforward |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
There is an invert option if you know the range you want to invert over, it will reverse the number so max is mapped to min and vice-versa, it was required for lightbulbs IIRC when HA only supported mireds but most Tuya bulbs are in Kelvin. |
Beta Was this translation helpful? Give feedback.
-
Seems its not going to work
|
Beta Was this translation helpful? Give feedback.
This error looks like it may be due to an incorrectly formatted mapping block.
mapping
always contains a list, even if there is only one default item. It should look something like this: