You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opening the issue so I don't forget and, if someone gets to it before me that's good too.
HistoricItem has a numericState method to return the state already cast/converted to a value we can do math with. This would be very useful to have on the Item class too.
In addition, this method should be Quantity aware or we should also provide an alternative quantityState method to make it easier to deal with the new Quantity 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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: