As I said, I am not sure what the "value" is tied to, but hopefully, it is the state of the Hysteresis element. There is no state attribute of a Hysteresis element.
Let me know if that works. Unfortunately, I cannot test it here now.
If that does not work, I may have another idea that is...