Closed rkoshak closed 1 year ago
I would propose to add both a numericState
and a quantityState
for convenience.
The getStateAs()
method is still not as simple to use as having those two properties, but I guess still worth to discuss it.
Since I am currently spending some time on the library, I'll take over that issue.
Opening the issue so I don't forget and, if someone gets to it before me that's good too.
HistoricItem
has anumericState
method to return the state already cast/converted to a value we can do math with. This would be very useful to have on theItem
class too.In addition, this method should be
Quantity
aware or we should also provide an alternativequantityState
method to make it easier to deal with the newQuantity
API.Or maybe it makes sense to bring back the whole
getStateAs()
discussion which can work for this as well as stuff like getting a Dimmer Item's ON/OFF state and the like.