spacemanspiff2007 / HABApp

Easy home automation with MQTT and/or openHAB
Apache License 2.0
54 stars 23 forks source link

Add a way to post_value/oh_post_update only if the state is equal/not equal #323

Closed spacemanspiff2007 closed 1 year ago

spacemanspiff2007 commented 1 year ago

Add a way to eliminate these statements:

if self.ist != val_ist:
    self.ist.post_value(val_ist)

Maybe

item.post_value_if(val_new, not_equal=val_new)