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

Tradfri unique identities #10414

Merged
merged 12 commits into from Nov 15, 2017

Conversation

Projects
None yet
5 participants
@NovapaX
Contributor

NovapaX commented Nov 6, 2017

Using unique identities when pairing with a gateway.
This prevents people from needing to reset the gateway when the key gets missing and they want to pair with home-assistant again.
For example when people 'start over', which probably happens quite a lot especially with new users.

NovapaX added some commits Nov 6, 2017

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.
@ggravlingen

I propose implementing this method while you are poking around with storing config data:
https://github.com/home-assistant/home-assistant/pull/10216/files

@ggravlingen

Json loader added 👍

security_code = callback_data.get('security_code')
api_factory = APIFactory(host, psk_id=identity, loop=hass.loop)
# Need To Fix: currently entering a wrong security code sends

This comment has been minimized.

@balloob

balloob Nov 11, 2017

Member

Is this existing behavior or is this something that this PR introduces?

@balloob

balloob Nov 11, 2017

Member

Is this existing behavior or is this something that this PR introduces?

This comment has been minimized.

@NovapaX

NovapaX Nov 12, 2017

Contributor

that is existing behaviour, or at least something that originates from the error handing in that tdls transport module in aiocoaps. It should be something that gets fixed in aiocoap or pytradfri. There's really nothing we can do to handle/catch it here for as far as we could see.

I'm personally looking into it too, but my (async) python skills are still 'evolving' ;)

@NovapaX

NovapaX Nov 12, 2017

Contributor

that is existing behaviour, or at least something that originates from the error handing in that tdls transport module in aiocoaps. It should be something that gets fixed in aiocoap or pytradfri. There's really nothing we can do to handle/catch it here for as far as we could see.

I'm personally looking into it too, but my (async) python skills are still 'evolving' ;)

This comment has been minimized.

@NovapaX

NovapaX Nov 13, 2017

Contributor

I created an issue on this here: chrysn/aiocoap#96

@NovapaX

NovapaX Nov 13, 2017

Contributor

I created an issue on this here: chrysn/aiocoap#96

NovapaX added some commits Nov 13, 2017

@balloob

Ok to merge when the last comment addressed. Thanks for your work on this 👍 🌮 🐬

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

@balloob balloob merged commit 1e493dc into home-assistant:dev Nov 15, 2017

4 checks passed

cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.03%) to 93.923%
Details
hound No violations found. Woof!
@balloob

This comment has been minimized.

Show comment
Hide comment
@balloob

balloob Nov 15, 2017

Member

🎉 🐬 🌮

Member

balloob commented Nov 15, 2017

🎉 🐬 🌮

@NovapaX NovapaX deleted the NovapaX:tradfri-unique-id branch Nov 15, 2017

@balloob balloob referenced this pull request Nov 17, 2017

Merged

0.58 #10630

mateuszdrab added a commit to mateuszdrab/home-assistant that referenced this pull request Dec 10, 2017

Master (#1)
* Add heal_node and test_node services. (#10369)

* Add heal_node and test_node services.

* lint

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

* Addition of new binary sensor class 'plug'

* use term "unplugged"

* add the entry to the right place

* Fix tradfri problem with brightness (#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 (#10365)

* Update frontend

* Update aiohttp to 2.3.1 (#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. (#10401)

* Zwave save cache to file now. (#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 (#10420)

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

* Remove extra info from zwave entity states

* Show initializing for nodes that haven't completed queries

* Fixes issue #10425 (#10426)

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

* Add baudrate option to Serial sensor (#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 (#10399)

* update tibber library (#10460)

* update pywebpush==1.3.0 (#10374)

* Fix slow WOL switch test (#10455)

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

* Fix recorder stop on SQLite vacuuming error

* Move import to function

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

* Add publish filter to mqtt_statestream

* Add tests for include/excludes in mqtt_statestream

* Upgrade to 0.1.2 (#10348)

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

* Upgrade pyatv to 0.3.6 (#10349)

Fix string conversion for idle state

* Remove useless temp converting (#10465)

* Fixed update() method and removed `ding` feature from stickupcams/floodlight (#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 (#10347)

* Improvement of KNX climate component (#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 (#10384)

* Reverted commit 1c8f179. This fixes issue: #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 (#10484)

* Updated gc100 package requirement to 1.0.3a

* Update requirements_all.txt

* Remove lag from Harmony remote platform (#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. (#10482)

* Improve error handling.

* Fix import of core requirements.

* cleanup

* Upgrade psutil to 5.4.1 (#10490)

* Upgrade youtube_dl to 2017.11.06 (#10491)

* Fix for telegram polling. (added pausing when error occurs) (#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 (#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 (#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 (#10510)

* OwnTracks Message Handling (#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. (#10469)

* Introduce media progress for Yamaha Musiccast devices (#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 (#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 (#10527)

* Update nederlandse_spoorwegen.py to include platform information (#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 (#10384)

* Reverted commit 1c8f179. This fixes issue: #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 (#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 (#10528)

* Pin yarl

* Update requirements

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

* Fix import in tests (#10525)

* Update axis.py (#10412)

* Add attribute to show who last un/set alarm (SPC) (#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. (#10533)

* Fixed Wink Quirky Aros bugs.

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

* Initial work in place

* Added new attributes + client UUID storage

* Wrapped up

* Collaborator-requested changes

* telegram_bot: Support for sending videos (#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 (#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 (#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 (#10536)

* Following the suggestion of @MartinHjelmare

* Google Assistant request sync service (#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 (#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 (#10548)

* Upgrade pysnmp to 4.4.2 (#10539)

* Fix and clean lametric (#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 (#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 (#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 #10551). (#10554)

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

* pad packets to multiple of 4 characters

This fixes sending commands, see #7669

* Update broadlink.py

* removed whitespace

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

* webostv: Reduce default timeout to prevent log spamming (#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 (#10562)

* Fix sound for lametric notify

* Remove not used method

* Use a template for the Universal media player state (#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 (#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 (#10566)

* Add code to enable discovery for mqtt cover (#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. (#10346)

* turn service call handler into coroutine (#10576)

* Add basic backend support for a system log (#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 (#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 (#10589)

* Update frontend to 20171115.0

* Cloud updates (#10567)

* Update cloud

* Fix tests

* Lint

* Upgrade youtube_dl to 2017.11.15 (#10592)

* Fix Yahoo Weather icons over SSL (#10602)

* Arlo - Fixes for updated library (#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 (#10600)

The frontend will not have this panel.

* Fix ValueError exception (#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 (#10608)

* Fix Hikvision switch bug

* Added comment about last working version

* Allow unicode when dumping yaml (#10607)

* Support script execution for Alexa (#10517)

* Support script execution for Alexa

* Use PowerController for the script component

* bump client version (#10610)

* New sensor viaggiatreno. (#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 (#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 (#10591)

* Small fix to be able to use mac and vendor in "device_tracker_new_device" event. (#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 (#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 #10399)

* fix after merge

* Cleanup old stale restore feature (#10593)

* Cleanup old stale restore feature

* cleanup

* Update __init__.py

* Update test_demo.py

* Lint

* Correct input_datetime initial value parsing (#10417)

* Correct input_datetime initial value parsing

* Correct input_datetime initial value parsing

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

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

* Fix typo

* Improve WUnderground config validation (#10573)

* Fix WUnderground config validation

* Fix indentation

* update hbmqtt to 0.9.1 (#10611)

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

* Snapcast: bump version and enable reconnect. (#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 #10264.

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

* Fix async missing decorators (#10628)

* Alexa slot synonym fix (#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 (#10622)

* Added sorted() to python_script (#10621)

* added sorted() to python_script

* fixed lint errors

* Add loglinefetch for frontend API call (#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 (#10598)

* Added unit_of_measurement to Currencylayer

* Updated based on comments

* Remove quote from name

* Change generic thermostat - any toggle device as heater switch (#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. (#10623)

* Add hddtemp sensor device even if unreachable.

* Removed old commented code.

* Move unit detection logic into update.

* Restore target temperature for generic thermostat (#10635)

* Restore target temp for generic thermostat

* Fix lint

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

* Update entity.py

* Update entity.py

* Alexa improvements (#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 (#10133)

* Update lnetatmo (#10631)

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

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

* Fixes AirVisual bug regarding incorrect location data

* Owner-requested changes

* Bump pyatv to 0.3.8 (#10643)

Fixes AirPlay issues on newer versions of tvOS.

* Update frontend to 20171118.0

* Implement entity and domain exclude/include for Alexa (#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 (#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 (#10054)

* Fixes AirVisual bug regarding incorrect location data

* Owner-requested changes

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

* Update entity.py

* Update entity.py

* Alexa improvements (#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 (#10133)

* Bump pyatv to 0.3.8 (#10643)

Fixes AirPlay issues on newer versions of tvOS.

* Implement entity and domain exclude/include for Alexa (#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 (#10386)

* Added cycles config option to LaMetric notifications (#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 (#10661)

* Netatmo httperror403 fix (#10659)

* Update lnetatmo

* updated zip

* updated zip

* Properly initialize Harmony remote (#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 (#10675)

* Include unit_of_measurement as InfluxDb field (#9790)

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

Tahoma platform for Somfy Covers and Sensors

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

* Reorganize lint travis builds (#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 (#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 (#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 (#10668)

* index.html improvements (#10696)

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

* Handle the new version of HydroQuebec website

* Update requirements_all.txt

* Add Arm Custom Bypass to alarm_control_panel (#10697)

* Fix conversation (#10686)

* Fix conversation

* Lint

* Bump frontend to 20171121.0

* Bump frontend to 20171121.0

* Version bump to 0.58.1

* Fix yweather (#10661)

* Properly initialize Harmony remote (#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 (#10682)

* Handle the new version of HydroQuebec website

* Update requirements_all.txt

* Fix for time_date sensor (#10694)

* fix to time_date sensor

* cleaned up the code and added unit tests

* fixed lint errors

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

* Shopping list: add item HTTP API

* Fix order of decorators

* Add presence device_class (#10705)

* Update frontend to 20171121.1

* Fix tests

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

* Adding Queue count sensor (#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 (#10728)

Fixes home-assistant/home-assistant#9965

* Fix unit conversion for Sensibo A/C units (#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) (#10735)

* Add transmission rate (#10740)

* Add transmission rate

* Rename transmission rate attributes to shorter names

* Update pytradfri to 4.1.0 (#10521)

* Use new DoorBirdPy (v0.1.0) (#10734)

* Use new DoorBirdPy (v0.1.0)

* Update requirements_all for DoorBirdPy 0.1.0

* Add fan and reduce I/O calls in radiotherm (#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 (#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. (#10737)

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

* Add test data.

* Google assistant climate mode fix (#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 (#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 (#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 (#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 (#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 (#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 (#10775)

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

* Fix scene description formatting. (#10785)

* Fixes #10773: Demo Alarm Broken (#10777)

* Fixes #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 (#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 (#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 (#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 (#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 (#10812)

* Add missing docstring

* Revert isort change

* Bump frontend to 20171127.0

* Cloud cognito switch (#10823)

* Allow email based cognito instance

* Fix quitting Home Assistant while reconnecting

* Lint

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

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

* Add tts.baidu platform (#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 #10766 (#10782)

* make RGB consitant as int. fixes #10766

* fix rounding and only change for hex convertion

* Single LEDs in Blinkt support (#10581)

* Single LEDs in Blinkt support

* Review remarks

* Add debug (#10828)

* Fix "recently pair device" (#10832)

Noticed a minor grammar mistake.

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

* Fix for Sensibo with missing temperature (#10801)

* Fix for sensibo woth missing temperature

* Use new temperatureUnit API field

* upgrade somecomfort to 0.5.0 (#10834)

* upgrading somecomfort to 0.5.0

* upgrade somecomfort to 0.5.0 in requirements files

* Add support for logarithm in templates (#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. (#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 (#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. (#10654)

* Ecobee set humidity level (#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 (#10829)

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

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

* Add useragent-based detection of JS version

* Keep es5 as default meanwhile

* Update test

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

* Upgrade HomeMatic, add devices (#10845)

* Climate component: add supported_features (#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 (#10851)

* Updated codeowner for Tile device tracker (#10861)

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

This reverts commit cadd797.

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

* Upgrade distro to 1.1.0 (#10850)

* Bugfix trigger state with multible entities (#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 (#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 (#10889)

* Upgrade fastdotcom to 0.0.3 (#10886)

* Upgrade schiene to 0.19 (#10887)

* Xiaomi Vacuum: remove deprecated calls (#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 (#10869)

* Create ecobee weather component

* Update requirements_all for ecobee

* Fix missed lint issue

* Microsoft Text-to-speech: Fixing missing en-gb support bug (#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 (#10890)

* Upgrade yarl to 0.15.0 (#10888)

* Fix tests (#10891)

* Refactored WHOIS sensor to resolve assumed key errors (#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 (#10863)

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

* Version bump to 0.59.0

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

* Fix issues from review

* Don't use STATE_UNKNOWN

* Bugfix #10902 (#10904)

* Version bump to 0.59.1

* Fix Notifications for Android TV (#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 (#10923)

Fixes: #19020

* Update frontend to 20171204.0 (#10934)

* Dominos no order fix (#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 (#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 (#10947)

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

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

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

* reload closest store on api request

* revert change from debugging

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

* Allow Wink siren/chimes to work

* Updated requirements_all.txt

* Revert pychromecast update (#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.