#NEWLINE# @ property #NEWLINE# def state_attributes( self ) : #NEWLINE# #INDENT# 'Return the optional state attributes.' #NEWLINE# data = { #NEWLINE# #INDENT# ATTR_CURRENT_TEMPERATURE : self . _convert_for_display ( self . current_temperature ) , #NEWLINE# ATTR_MIN_TEMP : self . _convert_for_display ( self . min_temp ) , #NEWLINE# ATTR_MAX_TEMP : self . _convert_for_display ( self . max_temp ) , #NEWLINE# ATTR_TEMPERATURE : self . _convert_for_display ( self . target_temperature ) , #NEWLINE# ATTR_TEMPERATURE_LOW : self . _convert_for_display ( self . target_temperature_low ) , #NEWLINE# ATTR_TEMPERATURE_HIGH : self . _convert_for_display ( self . target_temperature_high ) , #NEWLINE# #UNINDENT# } #NEWLINE# operation = self . operation #NEWLINE# if ( operation is not None ) : #NEWLINE# #INDENT# data [ ATTR_OPERATION ] = operation #NEWLINE# #UNINDENT# is_away = self . is_away_mode_on #NEWLINE# if ( is_away is not None ) : #NEWLINE# #INDENT# data [ ATTR_AWAY_MODE ] = ( STATE_ON if is_away else STATE_OFF ) #NEWLINE# #UNINDENT# is_fan_on = self . is_fan_on #NEWLINE# if ( is_fan_on is not None ) : #NEWLINE# #INDENT# data [ ATTR_FAN ] = ( STATE_ON if is_fan_on else STATE_OFF ) #NEWLINE# #UNINDENT# return self