Closed palmtreefrb closed 4 years ago
Thanks. What state storage attributes? Can you link me to those?
Sorry, used in your Climate component...
pysmartnode/components/devices/climate/definitions.py
STORAGE_AWAY_TEMPERATURE_LOW = "_a_temp_l"
STORAGE_AWAY_TEMPERATURE_HIGH = "_a_temp_h"
STORAGE_TEMPERATURE_LOW = "_temp_l"
STORAGE_TEMPERATURE_HIGH = "_temp_h"
pysmartnode/components/devices/climate/__init__.py
self.state = {TEMPERATURE_TARGET_HIGH: temp_high, # current temperature high
TEMPERATURE_TARGET_LOW: temp_low, # current temperature low
AWAY_MODE_STATE: AWAY_OFF, # away mode "ON"/"OFF"
STORAGE_AWAY_TEMPERATURE_HIGH: away_temp_high, # away temperature low
STORAGE_AWAY_TEMPERATURE_LOW: away_temp_low, # away temperature high
STORAGE_TEMPERATURE_HIGH: temp_high, # temperature high, storage value
STORAGE_TEMPERATURE_LOW: temp_low, # temperature low, storage value
CURRENT_MODE: str(self._modes["off"]),
CURRENT_ACTION: ACTION_OFF}
Ah these attributes. They are used to store the state of the climate component. They are implemented this way to make it easier to restore them from a single retained mqtt message after the device gets restarted.
wow, quick reply... you must be bored at home because of covid19 ;-|
:D I'm never bored but I am working through all notifications, emails and messages ;)
First, I want to say what you have done to implement this mqtt solution is fantastic. Thanks... Can you explain what the state storage attributes are to be used for?
Thanks, Rick