Skip to content

Custom min/max temperature for thermostat#227

Merged
balloob merged 2 commits intodevfrom
thermostat
Jul 24, 2015
Merged

Custom min/max temperature for thermostat#227
balloob merged 2 commits intodevfrom
thermostat

Conversation

@Danielhiversen
Copy link
Copy Markdown
Member

Make it possible to customize the min max temperature for the thermostat.

See also home-assistant/frontend#3

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using hasattr, it would be better suited whem implemented as properties with default values.

  @property
  def min_temp(self):
    self.hass.config.temperature(7, TEMP_CELCIUS)[0]

  def state_attributes(self):
    […]
    data[ATTR_MIN_TEMP] = self.min_temp

Any implementing thermostat would then just overwrite the min_temp property. This approach is in line with how other data is passed around within thermostats (for example is_away_mode_on)

@balloob
Copy link
Copy Markdown
Member

balloob commented Jul 23, 2015

When this is merged I'll merge home-assistant/frontend#3 and compile new version of frontend.

balloob added a commit that referenced this pull request Jul 24, 2015
Custom min/max temperature for thermostat
@balloob balloob merged commit d33af6e into dev Jul 24, 2015
@Danielhiversen Danielhiversen deleted the thermostat branch July 24, 2015 10:35
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants