Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fan and reduce I/O calls in radiotherm #10437

Merged
merged 9 commits into from Nov 22, 2017

Conversation

TD22057
Copy link
Contributor

@TD22057 TD22057 commented Nov 7, 2017

Description:

See issue #8404 for most of the details. The radiotherm underlying python module that the radiotherm climate component is using has a few issues. Every state element access is implemented as a separate url call which the thermostat can't handle and there are no time outs supported. I've reduced these as much as possible for now and reduce the number of url calls from ~7 per update() to 2-3 per update(). Given the constraint to use the existing library, a number of improvements that make this code work better (reducing calls even further to a single request, proper time outs, retry ability) can't be done. The things I could fix include:

  • fixed multiple web calls in update() to only use a minimum of calls for a large speed increase
  • fixed constructor to defer web calls until update() to speed up start up times
  • added correct temperature resolution
  • added fan attributes so the web front end now allows for manual fan control.

There is still a lot of work to do for this component but there have been several requests for this fix by users so I'm putting this in as is for now. Future work (which I'll open as a separate issue when I have time to finish it) includes:

  • asyncio support
  • automatic retry when set functions fail (which can happen sometimes)
  • fix auto mode which isn't really working right now
  • add proper hold mode as a switch that can be controlled from the web front end
  • full set of unit tests w/ a mock thermostat (there are 0 test cases for this right now)
  • move these fixes down to the 3rd party Python library. The current package owner hasn't responded to issue posts since June so it's not clear whether changes can be merged down or not at this point. Once I have a full set of fixes, I'll try and figure out how to get those propagated down or if the library should be forked.

NOTE: this was a previous PR that I closed because I somehow got my git branch into a strange state and could never fix it so I deleted the PR and the branch and started over. There were a number of comments about using the existing 3rd party radiotherm library instead of moving that functionality into the HA component. I disagreed with those since the only functionality being provided was a single web get/set call which tons of other components already do and they seem fine. However I've changed the code to use the existing library as efficiently as it can given that constraint.

Related issue (if applicable): fixes #8404

Checklist:

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

self._away = False
self._away_temps = away_temps
self._away_temps = [self.round_temp(i) for i in away_temps]
Copy link
Member

Choose a reason for hiding this comment

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

Create a function from round_temp and use that inside config validate. So you don't need do that here

vol.Optional(CONF_AWAY_TEMPERATURE_COOL,
default=DEFAULT_AWAY_TEMPERATURE_COOL): vol.Coerce(float),
default=DEFAULT_AWAY_TEMPERATURE_COOL):
vol.All(vol.Coerce(float), round_temp),

Choose a reason for hiding this comment

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

continuation line unaligned for hanging indent

PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_HOST): vol.All(cv.ensure_list, [cv.string]),
vol.Optional(CONF_HOLD_TEMP, default=False): cv.boolean,
vol.Optional(CONF_AWAY_TEMPERATURE_HEAT,
default=DEFAULT_AWAY_TEMPERATURE_HEAT): vol.Coerce(float),
default=DEFAULT_AWAY_TEMPERATURE_HEAT):
vol.All(vol.Coerce(float), round_temp),

Choose a reason for hiding this comment

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

continuation line unaligned for hanging indent

@TD22057
Copy link
Contributor Author

TD22057 commented Nov 10, 2017

If there are any reviewers out there, can you give me some advice on the pep8 error? The only solution I can find that makes it happy makes the code look bad:

    vol.Optional(CONF_AWAY_TEMPERATURE_COOL,
                 default=DEFAULT_AWAY_TEMPERATURE_COOL):
    vol.All(vol.Coerce(float), round_temp),


def set_fan_mode(self, fan):
"""Turn fan on/off."""
if fan == STATE_AUTO or fan == STATE_OFF:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you list STATE_AUTO as a fan mode if it does the same as STATE_OFF? Or am I missing something?

@@ -29,13 +29,38 @@
DEFAULT_AWAY_TEMPERATURE_HEAT = 60
DEFAULT_AWAY_TEMPERATURE_COOL = 85

# Mappings from radiotherm json data to HASS state flags. Note that
Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't find the reverse mappings you refer to. However, if they are somewhere, wouldn't it be better to generate them dynamically (e.g. via {v: k for k, v in NAME_TEMP_MODE.items() })?

vol.Optional(CONF_AWAY_TEMPERATURE_COOL,
default=DEFAULT_AWAY_TEMPERATURE_COOL): vol.Coerce(float),
default=DEFAULT_AWAY_TEMPERATURE_COOL):
vol.All(vol.Coerce(float), round_temp),

Choose a reason for hiding this comment

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

continuation line unaligned for hanging indent

PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_HOST): vol.All(cv.ensure_list, [cv.string]),
vol.Optional(CONF_HOLD_TEMP, default=False): cv.boolean,
vol.Optional(CONF_AWAY_TEMPERATURE_HEAT,
default=DEFAULT_AWAY_TEMPERATURE_HEAT): vol.Coerce(float),
default=DEFAULT_AWAY_TEMPERATURE_HEAT):
vol.All(vol.Coerce(float), round_temp),

Choose a reason for hiding this comment

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

continuation line unaligned for hanging indent

@TD22057
Copy link
Contributor Author

TD22057 commented Nov 14, 2017

I tried that one - I tried every indentation combination I could think of and never got one that worked and didn't look terrible. I think it's a bug in flake8...

@tinloaf
Copy link
Contributor

tinloaf commented Nov 14, 2017

Usually pylint gives you more helpful comments regarding indentation (i.e., tells you how much to indent). However, according to the travis build, pylint currently fails because of PRECISION_HALVES not being found. You should fix that (and other pylint errors), and then look at what pylint has to say to that indentation. Also, that's probably what causes the other travis build to fail.

@TD22057
Copy link
Contributor Author

TD22057 commented Nov 14, 2017

@tinloaf PRECISION_HALVES is broken because someone just moved it out of climate and didn't import it back. And pylint fails because of the mod that @pvizeli just pushed (i.e. not me). I'd love to fix it so if you can suggest a fix that passes flake8 (besides the one I already submitted), that would be great. pylint reports several indentations are OK (including the one that pvizeli just submitted) but flake8 fails them.

I could use some git help as well - the last time I tried to merge changes to my branch before pushing, I screwed everything up (I ended up with all my changes plus all the new dev changes). What's the correct way to pull down the current HA dev branch into my branch so I can fix the broken climate init changes?

@tinloaf
Copy link
Contributor

tinloaf commented Nov 14, 2017

Assuming that you have the hass repository (not your fork) added as a remote named upstream, these are the steps to rebase (not merge!) your fork onto the new dev branch:

(assuming you are in your repository and on the branch representing this PR)
git fetch upstream
git rebase upstream/dev
(… Conflicts may happen here. Fix them and finish the rebase. …)
git push --force

If someone has moved PRECISION_HALVES to somewhere else, you probably need to change your patch to import it from that new place.

@TD22057
Copy link
Contributor Author

TD22057 commented Nov 20, 2017

OK - I think this one is (finally) ready to go. I still don't particularly like the indentation required by flake8 on lines 69 and 72 but what's there is the only option I can find that passes.

@@ -77,19 +111,25 @@ class RadioThermostat(ClimateDevice):
def __init__(self, device, hold_temp, away_temps):
"""Initialize the thermostat."""
self.device = device
# It would be better if this was in update() since it triggers
# a network call but the thermostat will clear any temporary
# mode or temperature if this is called so we have to leave it here.
self.set_time()
Copy link
Member

Choose a reason for hiding this comment

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

You could move this to the coroutine entity method async_added_to_hass, which is called once, when the entity is added to home assistant, and run set_time in the executor via hass.async_add_job. See eg:
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/lutron.py#L70-L72

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks.

self._tmode = None
self._tstate = None
self._hold_temp = hold_temp
self._hold_set = False
self._away = False
self._away_temps = away_temps
self._prev_temp = None
self._operation_list = [STATE_AUTO, STATE_COOL, STATE_HEAT, STATE_OFF]
Copy link
Member

Choose a reason for hiding this comment

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

This could be moved to a constant at the top of the module.

self._away = False
self._away_temps = away_temps
self._prev_temp = None
self._operation_list = [STATE_AUTO, STATE_COOL, STATE_HEAT, STATE_OFF]
self._fan_list = [STATE_ON, STATE_AUTO]
Copy link
Member

Choose a reason for hiding this comment

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

Same as above.

Copy link
Member

Choose a reason for hiding this comment

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

It seems like the device can report three fan modes, but here the user can only select two modes. Is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks - I went back and checked the docs more carefully. The circulate mode is only supported by one model so I changed it to detect that model and use two different operations list depending on that flag.

self.set_time()
self._target_temperature = None
self._current_temperature = None
self._current_operation = STATE_IDLE
self._name = None
self._fmode = None
self._fstate = None
Copy link
Member

Choose a reason for hiding this comment

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

This is only assigned not used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added because I want to support a binary sensor in the future to measure when the fan is actually on and off. I'm not sure how to do that yet but having the fan state saved is part of it so I added it when updating all the other state variables.

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -30,6 +31,10 @@
DEFAULT_AWAY_TEMPERATURE_HEAT = 60
DEFAULT_AWAY_TEMPERATURE_COOL = 85

OPERATION_LIST = [STATE_AUTO, STATE_COOL, STATE_HEAT, STATE_OFF]
CT30_FAN_OPERATION_LIST = [STATE_ON, STATE_AUTO]
CT80_FAN_OPERATION_LIST = [STATE_ON, "Circulate", STATE_AUTO]
Copy link
Contributor

Choose a reason for hiding this comment

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

For better consistency, please define your own STATE_CIRCULATE constant (in this file) and use it everywhere instead of the string. Reduces the impact of typos and is more in line what all other components do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@tinloaf
Copy link
Contributor

tinloaf commented Nov 22, 2017

Out of curiosity, because I'm currently trying to get a picture of the "state machines" behind as many climate devices as possible: Can you explain what the difference between self._tstate and self._tmode is? Is _tmode what the user tells the device to do, and _tstate what the device actually currently does? (E.g.: The user can tell the device to heat, but the device can still be idle if the room is currently warmer than the target temperature.)

@TD22057
Copy link
Contributor Author

TD22057 commented Nov 22, 2017

@tinloaf Yes - that's correct. Modes are the commands to the device to set possible activity (cool, heat, off, fan on). States are what the device is doing at a particular time (cooling, heating, fan blowing). So if the mode is cool, the state will be idle until the thermostat decides the temperature has changed enough to turn on the AC at which point the state will go idle->cool. Once the correct temperature is reached, the state will go cool->idle; but the mode has been cool for the whole time.

@MartinHjelmare
Copy link
Member

Thanks!

@MartinHjelmare MartinHjelmare changed the title Added fan support. Reduced number of calls to the thermostat to a mi… Add fan and reduce I/O calls in radiotherm Nov 22, 2017
@MartinHjelmare MartinHjelmare merged commit b4635db into home-assistant:dev Nov 22, 2017
@TD22057 TD22057 deleted the radiotherm branch November 22, 2017 21:00
@TD22057 TD22057 restored the radiotherm branch November 22, 2017 21:00
@TD22057 TD22057 deleted the radiotherm branch November 22, 2017 23:08
@fabaff fabaff mentioned this pull request Dec 2, 2017
mateuszdrab added a commit to mateuszdrab/home-assistant that referenced this pull request Dec 10, 2017
* Add heal_node and test_node services. (home-assistant#10369)

* Add heal_node and test_node services.

* lint

* Addition of new binary sensor class 'plug' (home-assistant#10336)

* Addition of new binary sensor class 'plug'

* use term "unplugged"

* add the entry to the right place

* Fix tradfri problem with brightness (home-assistant#10359)

* Fix problem with brightness

* Fix typo

* Typo

* Update frontend to 20171105.0

* Update version to 0.57.2

* Upgrae simplepush to 1.1.4 (home-assistant#10365)

* Update frontend

* Update aiohttp to 2.3.1 (home-assistant#10139)

* Update aiohttp to 2.3.1

* set timeout 10sec

* fix freeze with new middleware handling

* Convert middleware auth

* Convert mittleware ipban

* convert middleware static

* fix lint

* Update ban.py

* Update auth.py

* fix lint

* Fix tests

* Device model identification of the Xiaomi Philips Ceiling Lamp fixed. (home-assistant#10401)

* Zwave save cache to file now. (home-assistant#10381)

* Add save config

* Add API to save Z-Wave cache to file immediatley.

* lint

* remove none assignment

* docstring

* Bump to 0.12.2 to fix urllib3 dependency (home-assistant#10420)

* Remove extra info from zwave entity states (home-assistant#10413)

* Remove extra info from zwave entity states

* Show initializing for nodes that haven't completed queries

* Fixes issue home-assistant#10425 (home-assistant#10426)

Fixes an error reported resulting from Hammersmith no longer supplying
data.

* Add baudrate option to Serial sensor (home-assistant#10439)

* Add baudrate option

Baudrate is essential!

* line too long

line too long (82 > 79 characters)

* trailing whitespace

* Rename const

* Fix the missing one

* Remove model info from state (home-assistant#10399)

* update tibber library (home-assistant#10460)

* update pywebpush==1.3.0 (home-assistant#10374)

* Fix slow WOL switch test (home-assistant#10455)

* Fix recorder stop on SQLite vacuuming error (home-assistant#10405)

* Fix recorder stop on SQLite vacuuming error

* Move import to function

* Add include/exclude filter to mqtt_statestream (home-assistant#10354)

* Add publish filter to mqtt_statestream

* Add tests for include/excludes in mqtt_statestream

* Upgrade to 0.1.2 (home-assistant#10348)

Fix an insecure request warning when not using verify=True. Contributed by @nalepae

* Upgrade pyatv to 0.3.6 (home-assistant#10349)

Fix string conversion for idle state

* Remove useless temp converting (home-assistant#10465)

* Fixed update() method and removed `ding` feature from stickupcams/floodlight (home-assistant#10428)

* Simplified URL expiration calculation and fixed refresh method

* Remove support from Ring from StickupCams or floodlight cameras

* Makes lint happy

* Removed unecessary attributes

* Upgrade apns2 to 0.3.0 (home-assistant#10347)

* Improvement of KNX climate component (home-assistant#10388)

* Added myself to codeowners

* Improved climate support with setpoint shift for KNX. (XKNX/xknx#48)

* requirements_all.txt

* typo

* flake

* Changes requested by @pvizeli

* Tellstick Duo acync callback fix (home-assistant#10384)

* Reverted commit 1c8f179. This fixes issue: home-assistant#10329

* convert callback to async

* fix lint

* cleanup

* cleanup

* cleanups

* optimize initial handling

* Update tellstick.py

* Update tellstick.py

* fix lint

* fix lint

* Update tellstick.py

* Fixed code errors and lint problems.

* fix bug

* Reduce logic, migrate to dispatcher

* Update tellstick.py

* Update tellstick.py

* fix lint

* fix lint

* Updated gc100 package requirement to 1.0.3a (home-assistant#10484)

* Updated gc100 package requirement to 1.0.3a

* Update requirements_all.txt

* Remove lag from Harmony remote platform (home-assistant#10218)

* Simplify kwargs handling

* Move Harmony remote to a persistent connection with push feedback

* Make default delay_secs configurable on the harmony platform

* Remove lint

* Fix delay_secs with discovery

* Temporary location for updated pyharmony

* Remove lint

* Update pyharmony to 1.0.17

* Remove lint

* Return an Optional marker

* Update pyharmony to 1.0.18

* Improve error handling. (home-assistant#10482)

* Improve error handling.

* Fix import of core requirements.

* cleanup

* Upgrade psutil to 5.4.1 (home-assistant#10490)

* Upgrade youtube_dl to 2017.11.06 (home-assistant#10491)

* Fix for telegram polling. (added pausing when error occurs) (home-assistant#10214)

* Fix for telegram polling. (added pausing when error occurs)

* fix pylint error.
invalid variable name ( Exception as _e)). Don't understand why as
removing the underscore fails with my local pylint..

* fixing too short variable name.

* moved logic to `check_incoming`

* fix line too long error.

* Simplify

* add JSON processing capabilities to sensor_serial (home-assistant#10476)

* add JSON processing capabilities

* format fixes

* format fixes

* Fix according to @fabaff comment

* reverting last commit to a more sane approach

* docstring...

* still docstring...

* passed script/lint

* downgrade exception

JSONDecodeError was only introduced in Python3.5

Since we are still supporting 3.4 ValueError is the parent class of
JSONDecodeError

* upgrade to new pylutron_caseta with TLS (home-assistant#10286)

* upgrade to new pylutron with TLS

* rename configuration options

* change more methods to coroutines

* use async_add_devices

* Bump dev to 0.58.0.dev0 (home-assistant#10510)

* OwnTracks Message Handling (home-assistant#10489)

* Improve handling and logging of unsupported owntracks message types

Added generic handlers for message types that are valid but not
supported by the HA component (lwt, beacon, etc.) and for
message types which are invalid. Valid but not supported
messages will now be logged as DEBUG. Invalid messages will
be logged as WARNING.

Supporting single "waypoint" messages in addition to the
roll-up "waypoints" messages.

Added tests around these features.

* Style fixes

*  Add support for Alexa intent slot synonyms. (home-assistant#10469)

* Introduce media progress for Yamaha Musiccast devices (home-assistant#10256)

* Introduce update_hass()

* Introduce media_positions

* Version bump pymusiccast

* Fix: Unnecessary "else" after "return"

* FIX D400: First line should end with a period

* Version bump

Fixes home-assistant#10411

* Add an option to serve ES6 JS to clients (home-assistant#10474)

* Add an option to serve ES6 JS to clients

* Rename es6 to latest

* Fixes

* Serve JS vrsions from separate dirs

* Revert websocket API change

* Update frontend to 20171110.0

* websocket: move request to constructor

* Adapt to new yarl API (home-assistant#10527)

* Update nederlandse_spoorwegen.py to include platform information (home-assistant#10494)

* Update nederlandse_spoorwegen.py

Make departure and arrival platforms available as state attributes

* Update nederlandse_spoorwegen.py

* Update nederlandse_spoorwegen.py

* Pin YARL to 0.13

* Tellstick Duo acync callback fix (home-assistant#10384)

* Reverted commit 1c8f179. This fixes issue: home-assistant#10329

* convert callback to async

* fix lint

* cleanup

* cleanup

* cleanups

* optimize initial handling

* Update tellstick.py

* Update tellstick.py

* fix lint

* fix lint

* Update tellstick.py

* Fixed code errors and lint problems.

* fix bug

* Reduce logic, migrate to dispatcher

* Update tellstick.py

* Update tellstick.py

* fix lint

* fix lint

* Fixed update() method and removed `ding` feature from stickupcams/floodlight (home-assistant#10428)

* Simplified URL expiration calculation and fixed refresh method

* Remove support from Ring from StickupCams or floodlight cameras

* Makes lint happy

* Removed unecessary attributes

* Version bump to 0.57.3

* Pin yarl (home-assistant#10528)

* Pin yarl

* Update requirements

* Support configuration of region (no service url neccessary (home-assistant#10513)

* Fix import in tests (home-assistant#10525)

* Update axis.py (home-assistant#10412)

* Add attribute to show who last un/set alarm (SPC) (home-assistant#9906)

* Add attribute to show who last un/set alarm.

This allows showing the name of the SPC user who last
issued an arm/disarm command and also allows for
automations to depend on this value.

* Optimize

* Update spc.py

* Update spc.py

* fix

* Fix test.

* Fix for removed is_state_attr.

* Fixed Wink Quirky Aros bugs. (home-assistant#10533)

* Fixed Wink Quirky Aros bugs.

* Adds support for Tile® Bluetooth trackers (home-assistant#10478)

* Initial work in place

* Added new attributes + client UUID storage

* Wrapped up

* Collaborator-requested changes

* telegram_bot: Support for sending videos (home-assistant#10470)

* telegram_bot: Support for sending videos

Telegram python library has a sendVideo function that can be used
similar to sending photos and documents.

* fix lint issue

* fix grammar

* Pre-construct frontend index.html (home-assistant#10520)

* Pre-construct frontend index.html

* Cache templates

* Update frontend to 20171111.0

* Fix iframe panel test

* notify.html5: use new json save and load functions (home-assistant#10416)

* update to use new save_json and load_json

* it is no longer possible to determine if the json file contains valid or empty data.

* fix lint

* Change to device state attributes (home-assistant#10536)

* Following the suggestion of @MartinHjelmare

* Google Assistant request sync service (home-assistant#10165)

* Initial commit for request_sync functionality

* Fixes for Tox results

* Fixed all tox issues and tested locally with GA

* Review comments - api_key, conditional read descriptions

* Add test for service

* Optimize concurrent access to media player image cache (home-assistant#10345)

We now do locking to ensure that an image is only downloaded and added
once, even when requested by multiple media players at the same time.

* webostv: set current source correctly (home-assistant#10548)

* Upgrade pysnmp to 4.4.2 (home-assistant#10539)

* Fix and clean lametric (home-assistant#10391)

* Fix and clean lametric

* Add missing DEPENDENCIES in notify platform.
* Remove not needed method in component manager class.
* Don't overwrite notify DOMAIN.
* Return consistently depending on found devices in setup of component.

* Get new token if token expired

* Add debug log for getting new token

* Clean up

* Support presence detection using Hitron Coda router (home-assistant#9682)

* Support presence detection using Hitron Coda router

* at least 2 spaces before inline comment

* Update hitron_coda.py

* rewrote authentication code, it actually works now

* make line slightly shorter to comply with hound

* Removed hardcoded IP address

* Fix string formatting, add timeout, and use generator

* Update hitron_coda.py

* Update hitron_coda.py

* Update hitron_coda.py

* typo

* update .coveragerc

* Update stale URL

* Better support for int types (home-assistant#10409)

* Better int types support

* type

* Added optional register order

* Fix white spaces

* Fix line length

* Fix line too long

* Fix trailing whitespace

* Stylistc code fixes

*  Don't use the 'id' field since it can be autogenerated (fixes home-assistant#10551). (home-assistant#10554)

* pad packets to multiple of 4 characters (home-assistant#10560)

* pad packets to multiple of 4 characters

This fixes sending commands, see home-assistant#7669

* Update broadlink.py

* removed whitespace

* Move temperature display helper from components to helpers (home-assistant#10555)

* webostv: Reduce default timeout to prevent log spamming (home-assistant#10564)

With the default timeout of 10 seconds, the log gets filled up with "component is taking more than 10 seconds" errors.
This should probably be fixed in some other way, but for now this reduces the problem a bit.

* Fix lametric sound (home-assistant#10562)

* Fix sound for lametric notify

* Remove not used method

* Use a template for the Universal media player state (home-assistant#10395)

* Implementation of `state_template` for the Universal media_player

* add tracking to entities in state template

* use normal config_validation

* fix tests, use defaults in platform schema, remove extra keys

* and test the new option `state_template`

* lint fixes

* no need to check attributes against None

* use `async_added_to_hass` and call `async_track_state_change` from `hass.helpers`

* Verisure: Added option to set installation giid (home-assistant#10504)

* Added option to set installation giid

* Changed where giid config var is being checked

* Style fix

* Fix style

* Bump ring_doorbell to 0.1.7 (home-assistant#10566)

* Add code to enable discovery for mqtt cover (home-assistant#10580)

* Add code to enable discovery for mqtt cover

* Fix pylint error

* Google Assistant for climate entities: Support QUERY and respect system-wide unit_system setting. (home-assistant#10346)

* turn service call handler into coroutine (home-assistant#10576)

* Add basic backend support for a system log (home-assistant#10492)

Everything logged with "warning" or "error" is stored and exposed via
the HTTP API, that can be used by the frontend.

* Tradfri unique identities (home-assistant#10414)

* Unique identity
Use unique ID for generating keys and store them in config. Fallback to
old id so existing installs will still work.

* Remove Timeouts
they don't really work. this should be fixed in pytradfri I think.

* import uuid only when necessary

* more selective import

* lint

* use load_json and save_json from util.json

* remove unnecessary imports

* use async configurator functions

* async configurator calls

* thou shalt not mixup the (a)syncs

* again: no asyncs in the syncs!
last warning...

* Update tradfri.py

* Add panel build type (home-assistant#10589)

* Update frontend to 20171115.0

* Cloud updates (home-assistant#10567)

* Update cloud

* Fix tests

* Lint

* Upgrade youtube_dl to 2017.11.15 (home-assistant#10592)

* Fix Yahoo Weather icons over SSL (home-assistant#10602)

* Arlo - Fixes for updated library (home-assistant#9892)

* Reduce update calls to API. Add signal strength monitor.

* Fix lint errors

* Fix indent

* Update pyarlo version and review fixes

* Fix lint errors

* Remove staticmethod

* Clean up attributes

* Update arlo.py

* Do not add panel from system_log (home-assistant#10600)

The frontend will not have this panel.

* Fix ValueError exception (home-assistant#10596)

* Fix ValueError exception

structure = '>{:c}'.format(data_types[register.get(CONF_DATA_TYPE)][register.get(CONF_COUNT)])
give:
ValueError: Unknown format code 'c' for object of type 'str'

* Minor typo

* Fix Hikvision (motion) switch bug (home-assistant#10608)

* Fix Hikvision switch bug

* Added comment about last working version

* Allow unicode when dumping yaml (home-assistant#10607)

* Support script execution for Alexa (home-assistant#10517)

* Support script execution for Alexa

* Use PowerController for the script component

* bump client version (home-assistant#10610)

* New sensor viaggiatreno. (home-assistant#10522)

* New sensor viaggiatreno.

I've messed up the previous PR so here it is in a new one.
Should include also all corrections from @pvizeli

* fixes from PR 10522

* fixed import order

* requested changes from MartinHjelmare

* Modbus switch register support (home-assistant#10563)

* Update modbus.py

* Fix blank linea and whitespaces

* Fix visual indent

* Fix visual indent

* fix multiple statements on one line

* Typo

* Disable pylint check

# pylint: disable=super-init-not-called

* Fix code style

* Upgrade mypy to 0.550 (home-assistant#10591)

* Small fix to be able to use mac and vendor in "device_tracker_new_device" event. (home-assistant#10537)

* Small fix to be able to use mac and vendor in EVENT_NEW_DEVICE event

* Missed device_tracker test

* add support for color temperature and color to Google Assistant (home-assistant#10039)

* add support for color temperature and color; also add some extra deviceInfo attributes

* change so that default behaviour doesn't turn off device if the action isn't handled

* add tests

* fix lint

* more lint

* use attributes were applicable

* removed debug logging

* fix unassigned if only None returned

* report more data in QUERY

* better tests for color and temperature

* fixes after dev merge

* remove deviceInfo as not part of a device state (PR home-assistant#10399)

* fix after merge

* Cleanup old stale restore feature (home-assistant#10593)

* Cleanup old stale restore feature

* cleanup

* Update __init__.py

* Update test_demo.py

* Lint

* Correct input_datetime initial value parsing (home-assistant#10417)

* Correct input_datetime initial value parsing

* Correct input_datetime initial value parsing

* Change generic thermostat to control heating on mode change Off -> Auto (home-assistant#10601)

* Change generic thermostat to control heating on mode change Off -> Auto

* Fix typo

* Improve WUnderground config validation (home-assistant#10573)

* Fix WUnderground config validation

* Fix indentation

* update hbmqtt to 0.9.1 (home-assistant#10611)

* Allow to pass YandexTTS options via sevice call (home-assistant#10578)

* Snapcast: bump version and enable reconnect. (home-assistant#10626)

This bumps the used snapcast version to 2.0.8 and enables the new
reconnect feature that causes the component to reconnect to a server if
the connection was lost.

This fixes the ned to restart Home Assstant after a snapcast reboot, as
described in issue home-assistant#10264.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Fix async missing decorators (home-assistant#10628)

* Alexa slot synonym fix (home-assistant#10614)

* Added logic to the alexa component for handling slot synonyms

* Moved note with long url to the top of the file

* Just made a tiny url instead of messing with Flake8

* Refactored to be more Pythonic

* Put trailing comma back

* Update frontend to 20171117.0

* Adjust logging in downloader component (home-assistant#10622)

* Added sorted() to python_script (home-assistant#10621)

* added sorted() to python_script

* fixed lint errors

* Add loglinefetch for frontend API call (home-assistant#10579)

* Add loglinefetch for frontend API call

* Too many blank lines

* Review changes

* review changes

* Only return a text

* Use aiohttp

* Don't do I/O in event loop

* Move lines to query and default to 0

* Small fixes

* Update frontend to 20171117.1

* Version bump to 0.58.0

* Added unit_of_measurement to Currencylayer (home-assistant#10598)

* Added unit_of_measurement to Currencylayer

* Updated based on comments

* Remove quote from name

* Change generic thermostat - any toggle device as heater switch (home-assistant#10597)

* Change generic thermostat - any toggle device as heater

* Heater switch state method

* Tests

* Debug log, lint

* Debug code remove, cleanup

* Change generic thermostat to control heating on mode change Off -> Auto

* Fix typo

* Review fixes, tests

* Merge and fix tests

* Add hddtemp sensor device even if unreachable. (home-assistant#10623)

* Add hddtemp sensor device even if unreachable.

* Removed old commented code.

* Move unit detection logic into update.

* Restore target temperature for generic thermostat (home-assistant#10635)

* Restore target temp for generic thermostat

* Fix lint

* Print entity type in "too slow" warnings (home-assistant#10641)

* Update entity.py

* Update entity.py

* Alexa improvements (home-assistant#10632)

* Initial scene support

* Initial fan support

* ordering

* Initial lock support

* Scenes cant be deactivated; Correct the scene display category

* Initial input_boolean support

* Support customization of Alexa discovered entities

* Initial media player support

* Add input_boolean to tests

* Add play/pause/stop/next/previous to media player

* Add missing functions and pylint

* Set manufacturerName to Home Assistant since the value is displayed in app

* Add scene test

* Add fan tests

* Add lock test

* Fix volume logic

* Add volume tests

* settup -> setup

* Remove unused variable

* Set required scene description as per docs

* Allow setting scene category (ACTIVITY_TRIGGER/SCENE_TRIGGER)

* Add alert, automation and group support/tests

* Change display categories to match docs

* simplify down the display category props into a single prop which can be used on any entity

* Fix tests to expect proper display categories

* Add cover support

* sort things

* Use generic homeassistant domain for turn on/off

* Make MQTT reconnection logic more resilient and fix race condition (home-assistant#10133)

* Update lnetatmo (home-assistant#10631)

* Support for Unifi direct access device tracker (No unifi controller software) (home-assistant#10097)

* Fixes AirVisual bug regarding incorrect location data (home-assistant#10054)

* Fixes AirVisual bug regarding incorrect location data

* Owner-requested changes

* Bump pyatv to 0.3.8 (home-assistant#10643)

Fixes AirPlay issues on newer versions of tvOS.

* Update frontend to 20171118.0

* Implement entity and domain exclude/include for Alexa (home-assistant#10647)

* Implement entity and domain exclude/include for Alexa

* Switch to using generate_filter

* Use proper domain for turn on/off calls except for groups where we must use the generic homeassistant.turn_on/off

* travis fixes

* Untangle

* Lint

* Add Facebook Notification tests (home-assistant#10642)

* test the facebook notification component

* respond to hound feedback

* remove unnecessary line breaks

* parse_qs not needed with requests_mock

* remove facebook notifier from .coveragerc

* Fixes AirVisual bug regarding incorrect location data (home-assistant#10054)

* Fixes AirVisual bug regarding incorrect location data

* Owner-requested changes

* Print entity type in "too slow" warnings (home-assistant#10641)

* Update entity.py

* Update entity.py

* Alexa improvements (home-assistant#10632)

* Initial scene support

* Initial fan support

* ordering

* Initial lock support

* Scenes cant be deactivated; Correct the scene display category

* Initial input_boolean support

* Support customization of Alexa discovered entities

* Initial media player support

* Add input_boolean to tests

* Add play/pause/stop/next/previous to media player

* Add missing functions and pylint

* Set manufacturerName to Home Assistant since the value is displayed in app

* Add scene test

* Add fan tests

* Add lock test

* Fix volume logic

* Add volume tests

* settup -> setup

* Remove unused variable

* Set required scene description as per docs

* Allow setting scene category (ACTIVITY_TRIGGER/SCENE_TRIGGER)

* Add alert, automation and group support/tests

* Change display categories to match docs

* simplify down the display category props into a single prop which can be used on any entity

* Fix tests to expect proper display categories

* Add cover support

* sort things

* Use generic homeassistant domain for turn on/off

* Make MQTT reconnection logic more resilient and fix race condition (home-assistant#10133)

* Bump pyatv to 0.3.8 (home-assistant#10643)

Fixes AirPlay issues on newer versions of tvOS.

* Implement entity and domain exclude/include for Alexa (home-assistant#10647)

* Implement entity and domain exclude/include for Alexa

* Switch to using generate_filter

* Use proper domain for turn on/off calls except for groups where we must use the generic homeassistant.turn_on/off

* travis fixes

* Untangle

* Lint

* Change some warnings to info (home-assistant#10386)

* Added cycles config option to LaMetric notifications (home-assistant#10656)

* Added cycles config option to lametric.py

Added cycles config option, changed display_time to lifetime, code cleanup

* Update lametric.py

* Update lametric.py

* Fix yweather (home-assistant#10661)

* Netatmo httperror403 fix (home-assistant#10659)

* Update lnetatmo

* updated zip

* updated zip

* Properly initialize Harmony remote (home-assistant#10665)

The delay_secs variable was not initialized if discovery was active and no
matching configuration block existed (i.e. override was None).

* Bump dev to 0.59.0.dev0 (home-assistant#10675)

* Include unit_of_measurement as InfluxDb field (home-assistant#9790)

* Tahoma platform for Somfy Covers and Sensors (home-assistant#10652)

Tahoma platform for Somfy Covers and Sensors

* Populate measurement state field for HA states like home/not_home (home-assistant#9833)

* Reorganize lint travis builds (home-assistant#10670)

* tox cleanup

* 1 tox step

* Revert pytest sugar changes

* Tox: make pylint its own task

* Bump Travis to 30 minutes timeout

* Fix for time_date sensor (home-assistant#10694)

* fix to time_date sensor

* cleaned up the code and added unit tests

* fixed lint errors

* Refactored to new global json saving and loading (home-assistant#10677)

* Refactored to new global json saving and loading

* Fixed emulated_hue tests

* Removed unnecassary error handling

* Added missing newline

* Remove unused imports

* Fixed linting error

* Moved _load_json wrapper out of the config class

* Convert configurator to use markdown (home-assistant#10668)

* index.html improvements (home-assistant#10696)

* Handle the new version of HydroQuebec website (home-assistant#10682)

* Handle the new version of HydroQuebec website

* Update requirements_all.txt

* Add Arm Custom Bypass to alarm_control_panel (home-assistant#10697)

* Fix conversation (home-assistant#10686)

* Fix conversation

* Lint

* Bump frontend to 20171121.0

* Bump frontend to 20171121.0

* Version bump to 0.58.1

* Fix yweather (home-assistant#10661)

* Properly initialize Harmony remote (home-assistant#10665)

The delay_secs variable was not initialized if discovery was active and no
matching configuration block existed (i.e. override was None).

* Handle the new version of HydroQuebec website (home-assistant#10682)

* Handle the new version of HydroQuebec website

* Update requirements_all.txt

* Fix for time_date sensor (home-assistant#10694)

* fix to time_date sensor

* cleaned up the code and added unit tests

* fixed lint errors

* Shopping list: add item HTTP API (home-assistant#10674)

* Shopping list: add item HTTP API

* Fix order of decorators

* Add presence device_class (home-assistant#10705)

* Update frontend to 20171121.1

* Fix tests

* python-miio version bumped for improved device support. (home-assistant#10720)

* Adding Queue count sensor (home-assistant#10723)

Adding another sensor to output the numeber of items in the SABnabd queue.  This is an alternative to displaying filesize, just a preference thing, as it is more meaningfull for me the way I use SABnzdb. 

Note this is my first time coding on github and I have no idea if I am doing things right, I assume that all I needed to do is add a couple of lines to the sensors available and also another line as to what to extract from the SABnzdb API, in this case I have called the sensor "queue_count" and it gets the value from the noofslots_total which as I understand - each slot is a separate download item. 

hope I did this correctly - also I don't have a separate instance of home assistant running for testing so I have no way to test this code (and I don't know how I would switch to the dev channel either).  As I said I am a newb!

* Bump pychromecast to 1.0.2 (home-assistant#10728)

Fixes home-assistant#9965

* Fix unit conversion for Sensibo A/C units (home-assistant#10692)

* Fix unit conversion for Sensibo A/C units

When the Sensibo component was released, there was a provision to not convert the temperature units unless "nativeTemperatureUnit" was returned with the API. I'm not sure if the API changed on Sensibo's side, but I do not get this key passed back with API requests.

This causes my current temperature to be returned in CELSIUS instead of FAHRENHEIT.

Removing this fixes it, and I can confirm the units are shown properly now.

* Update adding comment showing temperature is always in C

* Optimised images. Saved 80 KB out of 656 KB. 12.3% overall (up to 32.1% per file) (home-assistant#10735)

* Add transmission rate (home-assistant#10740)

* Add transmission rate

* Rename transmission rate attributes to shorter names

* Update pytradfri to 4.1.0 (home-assistant#10521)

* Use new DoorBirdPy (v0.1.0) (home-assistant#10734)

* Use new DoorBirdPy (v0.1.0)

* Update requirements_all for DoorBirdPy 0.1.0

* Add fan and reduce I/O calls in radiotherm (home-assistant#10437)

* Added fan support.  Reduced number of calls to the thermostat to a minimum

* Move temp rounding to config schema

* Fixed pep8 errors

* Fix for review comments.

* removed unneeded if block

* Added missing precision attr back

* Fixed pylint errors

* Code review fixes.  Fan support by model number.

* Defined circulate state

* New Hive Component / Platforms (home-assistant#9804)

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* Changes

* Changes

* Changes

* changes

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Sensor code updates

* Sensor code updates

* Move sensors to binary sensors

* Quack

* Updates - Removed climate related sensors

* sensor fix

* binary_sensor updates

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* Temporarily fix yahoo weather API issue and add unit test. (home-assistant#10737)

* Temporarily fix yahoo weather API issue and add unit test.

* Add test data.

* Google assistant climate mode fix (home-assistant#10726)

* Changed supported climate modes lookup to be case insensitive by forcing to lower-case

* Fixed style errors. (Blank line and line too long)

* Protect sensitive information for Amcrest cameras (home-assistant#10569)

*  Creates a AmcresHub object to protect some private attributes on the logs

* Uses hass.data to pass AmcrestHub to components

* Prefer constants

* Removed serializer since it's using hass.data and simplified camera entity constructor

* small cleanup

* InfluxDB send retry after IOError (home-assistant#10263)

* Implement data write retry for InfluxDB

This adds an optional max_retries parameter to the InfluxDB component
to specify if and how often the component should try to send the data
if the connection failed due to an IOError.

The sending will be scheduled for a retry in 20 seconds as often as the
user specified. This can be handy for flaky getwork connections between
the DB and Homeassistant or outages like daily DSL reconnects.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Add unittest for influx write retries

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Add RetryOnError as helper decorator in util

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Add unittests for RetryOnError

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Use RetryOnError decorator in InfluxDB

This replaces the scheduling logic in the InfluxDB component with the
RetryOnError decorator from homeassistant.util

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Make the linters happy

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Implement a queue limit for the retry decorator.

This adds a queue limit to the RetryOnError handler. It limits the
number of calls waiting for be retried. If this number is exceeded,
every new call will discard the oldest one in the queue.

* influxdb: Add the retry queue limit option.

* Make the linter happy.

* Make pylint happy

* Log exception of dropped retry

* Move RetryOnError decorator to influxdb component.

* Fix bug in logging usage

* Fix imports

* Add newlines at the end of files.

* Remove blank line

* Remove blank line

* Add Dominos Pizza platform (home-assistant#10379)

* add dominos service

* change require

* dump to log

* component fixes

* clean-up use updated library

* remove unnecessary import

* fix hound errors

* more lint fixes

* Coverage rc

* update requirements

* cleanup as per notes

* missing message

* linting...

* schema validation and reducing requests

* fixlint

* spacing

* unused variable

* fix docstrings

* update req

* notes updates, pypi package, front-end panel

* stale import

* fix constant name

* docstrings

* fix library import

* lint fixes

* pylint bug

* remove built-in panel

* Make synchronous

* unused import and use throttle

* Handle exceptions properly and update client

* Import exceptions properly

* unused import

* remove bloat from start-up, readability fixes from notes, retrieve menu on request, not on startup

* whitespace on blank line

* Fix name collision when using multiple Hue bridges (home-assistant#10486)

* Fix name collision when using multiple Hue bridges

See home-assistant#9393

* Use new style of string formatting

* Removed creating of "All Hue Lights" group

* Make shell_command async (home-assistant#10741)

* Make shell_command async

Use `asyncio.subprocess` instead of `subprocess` to make the
`shell_command` component async.

Was able to migrate over existing component and tests without too many
drastic changes.

Retrieving stdout and stderr paves the way for possibly using these in
future feature enhancements.

* Remove trailing comma

* Fix lint errors

* Try to get rid of syntaxerror

* Ignore spurious pylint error

* Update CODEOWNERS with hive Component / Platforms (home-assistant#10775)

* Bump total-connect-client version (home-assistant#10769)

* Fix scene description formatting. (home-assistant#10785)

* Fixes home-assistant#10773: Demo Alarm Broken (home-assistant#10777)

* Fixes home-assistant#10773: Demo Alarm Broken

* Added test for platform setup

* Remove unused import

* Lint fix

* Rework assert to work with python 3.5

* Load Ring camera only with Ring Protect plan activated (home-assistant#10739)

* Added ability to only load Ring camera
if the Ring Protect plan is activated.

* Fixed notification for all invalid cameras

* Fixed attribute name

* Using asyncio for persistent notifications

* system_log improvements (home-assistant#10709)

* system_log improvements

* Don't use ModuleNotFoundError which is 3.6+

* Don't use FrameSummary which was added in 3.5

* Don't trace stack for exception logs

* Handle test error in Python 3.4

* Fix WUnderground error handling, rework entity methods (home-assistant#10295)

* WUnderground sensor error handling and sensor class rework

* WUnderground error handling, avoid long state, tests

* Wunderground - add handling ValueError exception on parsing

* Changes to address review comments - part 1

* Tests lint

* Changes to address review comments - part 2

* Add away_mode_name to arlo alarm control panel (home-assistant#10796)

* Update arlo.py

Include variables for custom away mode specification

* fixed line too long style problem

* fix trailing white space

* fix sending away mode command

* Bump frontend to 20171126.0

* Add missing docstring (home-assistant#10812)

* Add missing docstring

* Revert isort change

* Bump frontend to 20171127.0

* Cloud cognito switch (home-assistant#10823)

* Allow email based cognito instance

* Fix quitting Home Assistant while reconnecting

* Lint

* Added sensor types from telldus server src (home-assistant#10787)

Added from https://github.com/telldus/tellstick-server/blob/master/telldus/src/telldus/Device.py

* Add tts.baidu platform (home-assistant#10724)

* Add tts.baidu platform

* Update baidu.py

* changed to sync

get_engine and get_tts_audio changed to sync.

* make RGB values consistent as int. fixes home-assistant#10766 (home-assistant#10782)

* make RGB consitant as int. fixes home-assistant#10766

* fix rounding and only change for hex convertion

* Single LEDs in Blinkt support (home-assistant#10581)

* Single LEDs in Blinkt support

* Review remarks

* Add debug (home-assistant#10828)

* Fix "recently pair device" (home-assistant#10832)

Noticed a minor grammar mistake.

* Fixed Yeelight's color temperature conversion to RGB (home-assistant#10831)

* Fix for Sensibo with missing temperature (home-assistant#10801)

* Fix for sensibo woth missing temperature

* Use new temperatureUnit API field

* upgrade somecomfort to 0.5.0 (home-assistant#10834)

* upgrading somecomfort to 0.5.0

* upgrade somecomfort to 0.5.0 in requirements files

* Add support for logarithm in templates (home-assistant#10824)

* Add support for logarithm in templates

This adds a 'log' filter that takes the logarithm of the given value,
with an optional base number. The base defaults to 'e' - the natural
logarithm

* Remove usage of log10 in template filter 'log'

* Add logarithm as a global

This makes it possible to write:
'{{ log(4, 2) }}'

* Changing handling for google_assistant groups to treat them as lights. (home-assistant#10111)

* Fixed aliases warning message

* Fixed test cases

* Changing handling for google_assistant groups to treat them as lights - amending to include user info.

* Enable brightness, RGB, etc for groups in Google Assistant

* Revert color/hue/temp settings

* Change servce from light to homeassistant

* Fixed config_units

* Convert from light to switch

* Change group to switch

* Update tests to switch instead of light for group

* Tellduslive update with support for auto config and Local api (home-assistant#10435)

* Add support for local api connection found in TellStick Znet Lite/Pro.
Added auto discovery support for all TelldusLive devices,
changed authentication method. Breaking change!
Upgraded tellduslive dependency
Update CODEOWNERS.

* Close any open configurator when configuration done

* Add support for Telldus Local API via config (#2)

* Updated dependency (addresses issue raised by @rasmusbe in home-assistant#10435 (comment))

* Fix requested changes

* KNX: Added config option for broadcasting current time to KNX bus. (home-assistant#10654)

* Ecobee set humidity level (home-assistant#10780)

* Add the ability to set humidity levels on ecobee thermostats

* use the latest version of python-ecobee-api

* Lint fixes

* Add device class for low battery (home-assistant#10829)

* Tellduslive: Use magic constants for battery level. Also, the previous formula for battery level was wrong. (home-assistant#10788)

* Add useragent-based detection of JS version (home-assistant#10776)

* Add useragent-based detection of JS version

* Keep es5 as default meanwhile

* Update test

* add support for multiple execution per execute request (home-assistant#10844)

* Upgrade HomeMatic, add devices (home-assistant#10845)

* Climate component: add supported_features (home-assistant#10658)

* Implement supported_features for the climate component

* Test supported features

* Convert generic thermostat to supported features

* Max / min temperature are not features

* Fix lint

* Min / max humidity are not features

* Linting

* Remove current temperature / humidity

* Move c-hacker-style constants to boring integers. Booo!

* Refactor all the climate platforms to use the new supported_features

* Force all climate platforms to implement supported_features

* Fix mistakes

* Adapt hive platform

* Move flags into a constant

* Calm the hound

* Upgrade mutagen to 1.39 (home-assistant#10851)

* Updated codeowner for Tile device tracker (home-assistant#10861)

* Revert "KNX: Added config option for broadcasting current time to KNX bus. (home-assistant#10654)" (home-assistant#10874)

This reverts commit cadd797.

As discussed within home-assistant#10708 we should chose a different implementation. Therefore we should revert this change to avoid a breaking change.

* Upgrade distro to 1.1.0 (home-assistant#10850)

* Bugfix trigger state with multible entities (home-assistant#10857)

* Bugfix trigger state with multible entities

* Fix numeric state

* fix lint

* fix dict

* fix unsub

* fix logic

* fix name

* fix new logic

* add test for state

* add numeric state test for unsub

* add test for multible entities

* Update numeric_state.py

* Update numeric_state.py

* Update state.py

* Fix logic for triple match

* Add clear to numeric state

* clear for state trigger

* tellstick fix DEPENDENCIES and update tellcore-net (home-assistant#10859)

* Update requirements_all.txt

* Update tellstick.py

* Fix DEPENDENCIES

* Update requirements_all.txt

* fix format

* fix lint

* fix lint

* Update tellstick.py

* update tellcore-net

* update tellcore-net

* besser validate

* Update frontend to 20171130.0

* Upgrade aiohttp to 2.3.5 (home-assistant#10889)

* Upgrade fastdotcom to 0.0.3 (home-assistant#10886)

* Upgrade schiene to 0.19 (home-assistant#10887)

* Xiaomi Vacuum: remove deprecated calls (home-assistant#10839)

* vacuum.xiaomi_miio: read dnd status properly instead of using imprecise dnd flag from vacuum_state

* vacuum.xiaomi_miio: use miio package instead of mirobo

* check only that wanted calls have taken place, ignore order of calls

* Fix linting issues

* Remove empty line after docstring

* Create ecobee weather platform (home-assistant#10869)

* Create ecobee weather component

* Update requirements_all for ecobee

* Fix missed lint issue

* Microsoft Text-to-speech: Fixing missing en-gb support bug (home-assistant#10429)

* Fixing missing en-gb support bug

* Microsoft TTS adding support for rate, volume, pitch and contour.

* Microsoft TTS fixing support for jp-jp.

* Fixing linting error on line 67

* make impossible things possible 🎉

* Upgrade youtube_dl to 2017.11.26 (home-assistant#10890)

* Upgrade yarl to 0.15.0 (home-assistant#10888)

* Fix tests (home-assistant#10891)

* Refactored WHOIS sensor to resolve assumed key errors (home-assistant#10662)

* Refactored WHOIS sensor to resolve assumed key errors

Altered it to now set an attribute key and value only if the attribute
is present in the WHOIS response. This prevents assumed keys (registrar)
from raising a KeyError on WHOIS lookups that don't contain registrar
information (onet.pl, wp.pl, for example).

* Removed non-used self._data

* WHOIS sensor now creates a new local attributes dict and overrides

* Corrected typos, refactored error cases to clear state adn attributes

* Resolved double return and refactored error logging

* Serve latest extra_html in dev mode (home-assistant#10863)

* Reload groups after saving a change via config API (home-assistant#10877)

* Version bump to 0.59.0

* Fix issues from review of ecobee weather component (home-assistant#10903)

* Fix issues from review

* Don't use STATE_UNKNOWN

* Bugfix home-assistant#10902 (home-assistant#10904)

* Version bump to 0.59.1

* Fix Notifications for Android TV (home-assistant#10798)

* Fixed icon path, added dynamic icon

* Addressing requested changes

* Using DEFAULT_ICON

* Using CONF_ICON from const

* Getting hass_frontend path via import

* Lint

* Using embedded 1px transparent icon

* woof -.-

* Lint

* fix ios component config generation (home-assistant#10923)

Fixes: home-assistant#19020

* Update frontend to 20171204.0 (home-assistant#10934)

* Dominos no order fix (home-assistant#10935)

* check for none

* fix error from no store being set

* typo

* Lint

* fix default as per notes. Lint fix and make closest store None not False

* update default

* Version bump to 0.59.2

* Require FF43 for latest js (home-assistant#10941)

* Require FF43 for latest js

`Array.prototype.includes` added in Firefox 43

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes

* Update __init__.py

* Fix linksys_ap.py by inheriting DeviceScanner (home-assistant#10947)

As per issue home-assistant#8638, the class wasn't inheriting from DeviceScanner, this commit patches it up.

* Upgrade tellduslive library version (closes home-assistant#10922) (home-assistant#10950)

* Reload closest store on api menu request (home-assistant#10962)

* reload closest store on api request

* revert change from debugging

* Allow chime to work for wink siren/chime (home-assistant#10961)

* Allow Wink siren/chimes to work

* Updated requirements_all.txt

* Revert pychromecast update (home-assistant#10989)

* Revert pychromecast update

* Update cast.py
@home-assistant home-assistant locked and limited conversation to collaborators Mar 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Radiotherm thermostats keep losing connectivity
7 participants