Commit Graph

254 Commits (40a47c72f432d6bd74b30d1883feed16d1cdc9f0)

Author SHA1 Message Date
Franck Nijhof ffb4b4df96
Only report deprecated device_state_attributes once (#60980) 2021-12-04 13:37:42 +01:00
Marvin Wichmann 707fe67c00
Move StrEnum to homeassistant.backports and move Platform to homeassistant.const (#60880)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-12-03 09:31:17 +01:00
Franck Nijhof c28b45cd83
Migrate entity categories to StrEnum (#60720) 2021-12-01 13:54:36 +01:00
Ville Skyttä 7c6a72b086
Remove unneeded pylint disables (#60235) 2021-11-23 21:40:53 +01:00
Ville Skyttä 053c456199
Change device entry type to an StrEnum (#59940)
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-11-22 18:14:15 +01:00
Erik Montnemery 49a27e12ad
Add support to entity registry for overriding device_class (#59985) 2021-11-22 08:38:06 -08:00
Erik Montnemery 1609c0cc2c
Sort some entity_registry code (#59876)
* Sort some entity_registry code

* Sort some more entity_registry code

* Tweak
2021-11-18 11:51:32 +01:00
Simone Chemelli 8a02d87a17
Removed deprecated "device_state_attributes" for Amberelectric (#59672)
* Removed deprecated "device_state_attributes"

* Cleanup

* Postpone removal

* log deprecation warning

* Update homeassistant/helpers/entity.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-11-16 16:11:46 +01:00
Paulus Schoutsen a122cbab61
Mobile app to update entity registry on re-register sensors (#58378)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-31 20:21:46 -07:00
Erik Montnemery a0a8b9db26
Add entity category 'system' (#58595)
* Add entity category 'hidden'

* Update cloud

* Update Google assistant

* Update Alexa

* Fix tests

* Add ENTITY_CATEGORIES constant

* Rename ENTITY_CATEGORY_HIDDEN to ENTITY_CATEGORY_SYSTEM

* Correct import in motioneye
2021-10-28 14:36:41 +02:00
Erik Montnemery 1eebe45154
Add support for entity categories to MQTT entities (#57656)
* Add support for entity categories to MQTT entities

* Improve test

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Update homeassistant/components/mqtt/mixins.py

Co-authored-by: Paul Monigatti <paulmonigatti@users.noreply.github.com>

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paul Monigatti <paulmonigatti@users.noreply.github.com>
2021-10-15 14:28:30 +02:00
Erik Montnemery e27e4c3561
Add support for device configuration URL (#57539)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-10-14 11:16:56 -07:00
Erik Montnemery 4b3d423767
Add config and diagnostic entities (#57528)
* Add config entity concept

* Rename is_config_entity to entity_category

* Add test

* Add 'diagnostic' entity category
2021-10-14 10:04:26 +02:00
Erik Montnemery bdbedd0f06
Alphabetize parts of device registry code (#57532) 2021-10-12 12:08:59 +02:00
Franck Nijhof 13db867c1d
Move attribution attribute to Entity base class (#57492) 2021-10-11 23:15:32 +02:00
Erik Montnemery 6954614e62
Warn if total_increasing sensor has negative states (#56564) 2021-09-30 07:49:16 -07:00
Marc Mueller 7af67d34cf
Use assignment expressions 01 (#56394) 2021-09-18 13:31:35 -10:00
Marc Mueller 69e413ac1e
Update pylint to 2.10.1 (#54963)
* Update pylint to 2.10.0

* useless-suppression

* Consider-using-tuple

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Use dict.items()

* Add pylint disable

* Use pylint 2.10.1

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-08-21 10:41:23 +02:00
Erik Montnemery 4e07ab1b32
Move temperature conversions to sensor base class (1/8) (#48261)
* Move temperature conversions to entity base class (1/8)

* Update integrations a-c

* Leave old temperature conversion until all integrations are migrated

* tweak

* Use contextlib.suppress

* Remove the MeasurableUnitEntity mixin

* Address comments, add tests

* Fix f-string

* Drop deprecation warning from base entity class

* Update with _attr-shorthand

* Fix rebase mistakes

* Fix additional rebase mistakes

* Only report temperature conversion once

* Fix additional rebase mistakes

* Format homeassistant/components/bbox/sensor.py

* Fix check for overidden _attr_state

* Remove test workarounds from implementation

* Remove useless None-check

* Tweaks

* Migrate new sensors a-c

* Update climacell

* Push deprecation of temperature conversion forward

* Override __repr__ in SensorEntity

* Include native_value in SensorEntity attributes

* Pylint

* Black

* Black

* Fix rebase mistakes

* black

* Fix rebase mistakes

* Revert changes in august/sensor.py

* Revert handling of unit converted restored state

* Apply code review suggestion

* Fix arlo test
2021-08-11 10:45:05 +02:00
Allen Porter 160bd74bae
Update DeviceInfo static types (#54276)
* Update nest static types from aditional PR feedback

Update nest and device helper static types based on post-merge discussion in PR #53475

* Remove unused type: ignore in synology

* Remove check for None device type

Remove check for None device type in order to reduce untested code as this is
a case not allowed by the nest python library.
2021-08-08 19:24:36 -07:00
Franck Nijhof d4c4263730
Adjust typing of _attr_extra_state_attributes (#53529) 2021-07-27 01:25:22 +02:00
Franck Nijhof 0b44265232
Add description classes to entity components (#53521)
* Add description classes to entity components

* An -> A

* Add StateVacuumEntityDescription
2021-07-27 00:22:21 +02:00
Franck Nijhof ee452d415d
Add SensorEntityDescription class (#53357) 2021-07-26 22:00:43 +02:00
Aaron Bach 0fd88e7e66
Type _attr_extra_state_attributes as a MutableMapping (#52616)
* Type extra_state_attributes as a MutableMapping

* Update homeassistant/helpers/entity.py

Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>

* Update homeassistant/helpers/entity.py

Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
2021-07-20 15:41:03 -06:00
Erik Montnemery b916247e8e
Improve editing of device automation referring non added select entity (#52047)
* Improve editing of device automation referring non added select entity

* Update tests
2021-06-21 14:49:51 +02:00
Erik Montnemery ba6b527d61
Improve editing of device actions referencing non-added HVAC (#51706)
* Improve editing of device actions referencing non-added HVAC

* Improve test coverage
2021-06-11 11:13:55 +02:00
Erik Montnemery a1e3283f8f
Improve editing of device automations referencing non-added sensors (#51312) 2021-06-08 23:28:08 -07:00
Franck Nijhof d51fc5814a
Define ToggleEntity entity attributes as class variables (#51231)
* Define ToggleEntity entity attributes as class variables

* Fix upcloud overriding state property

* Implement available state for upcloud, to compensate removed state
2021-06-02 08:53:55 +02:00
Franck Nijhof 38d095aa18
Define entity attributes as entity class variables (#50925)
* Define entity attributes as entity class variables

* Example coronavirus integration

* Example verisure

* Cleanup/typing fixes

* Fix Coronavirus

* Revert "Fix Coronavirus"

This reverts commit 060843860f.

* Revert "Cleanup/typing fixes"

This reverts commit 659b79e75a.

* Define entity attributes as entity class variables (attr alternative)

* Example coronavirus

* Example nut

* Example verisure

* Mark private

* Cleanup after all reverting/cherrypicking/merging

* Implement all entity properties

* Update coronavirus example

* Update nut example

* Update verisure example

* Lets not talk about this one...

* Fix multiple class attribute
2021-05-22 09:13:50 -07:00
Ville Skyttä ed10856cc4
UpCloud API and typing update (#50624) 2021-05-14 21:49:41 -07:00
Ville Skyttä b89c53f759
Type hint device registry identifiers as set of str 2-tuples (#50355)
* Type hint device registry identifiers as set of str 2-tuples

* Fix airly test

* Really fix airly test, add another migration test
2021-05-10 12:13:45 +02:00
Franck Nijhof 44383f25ce
Clean up pylint comments (#49334) 2021-05-05 08:56:50 +02:00
Ville Skyttä 59f32f7c9c
Make device info a TypedDict (#49670) 2021-04-30 23:21:39 +02:00
Erik Montnemery d2fd504442
Limit precision when stringifying float states (#48822)
* Limit precision when stringifying float states

* Add test

* Fix typing

* Move StateType

* Update

* Move conversion to entity helper

* Address review comments

* Tweak precision

* Tweak

* Make _stringify_state an instance method
2021-04-27 21:48:24 +02:00
Marc Mueller c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Erik Montnemery 7e4be921a8
Add helper to get an entity's supported features (#48825)
* Add helper to check entity's supported features

* Move get_supported_features to helpers/entity.py, add tests

* Fix error handling and improve tests
2021-04-10 08:19:16 +02:00
Ruslan Sayfutdinov a6759d731d
Use Mapping[str, Any] instead of dict in Entity (#48421) 2021-03-31 19:34:00 +02:00
Marc Mueller 6fb2e63e49
Update typing 02 (#48014) 2021-03-17 18:34:19 +01:00
Franck Nijhof 5d5a110a20
None optional hass typing in base entity and notify (#47528) 2021-03-15 15:11:41 +01:00
Erik Montnemery 3a054c3be7
Replace Entity.device_state_attributes with Entity.extra_state_attributes (#47304) 2021-03-09 13:58:43 +01:00
tkdrob c2302784c2
Use core constants for helpers (#46240) 2021-02-08 22:53:17 +01:00
Paulus Schoutsen 9e07910ab0
Mark entities as unavailable when they are removed but are still registered (#45528)
* Mark entities as unavailable when they are removed but are still registered

* Add sync_entity_lifecycle to collection helper

* Remove debug print

* Lint

* Fix tests

* Fix tests

* Update zha

* Update zone

* Fix tests

* Update hyperion

* Update rfxtrx

* Fix tests

* Pass force_remove=True from integrations

Co-authored-by: Erik <erik@montnemery.com>
2021-02-08 10:45:46 +01:00
J. Nick Koston df2ede6522
Fix state overwrite race condition where two platforms request the same entity_id (#42151)
* Fix state overwrite race condition where two platforms request the same entity id

* fix test

* create reservations instead

* revert

* cannot use __slots__ because we patch async_all
2020-10-21 17:01:51 +02:00
J. Nick Koston f50976a0b3
Switch to asyncio.wait for slow update warning implementation (#41184) 2020-10-05 15:28:15 +02:00
springstan a2c3c33b22
Use core GitHub URL in all files (#41089) 2020-10-03 00:04:11 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Paulus Schoutsen 3dc79aa60a
Track entity sources (#37258)
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
2020-08-19 14:57:38 +02:00
Ville Skyttä 802c556e82
State and service related type hint improvements (#38956)
* Improve type hint of service_func to register

* Add named type for state values

* Narrow some unnecessarily broad state type hints
2020-08-17 15:02:43 -04:00
J. Nick Koston 79055487ed
Simplify generate_entity_id (#38418)
* Simplify generate_entity_id

Use similar optimized logic for async_generate_entity_id
from entity_registry that was already optimized

* pylint

* make generate_entity_id a wrapper around async_generate_entity_id instead
2020-07-31 08:50:42 +02:00
J. Nick Koston 910b6c9c2c
Index entity_registry_updated listeners (#37940) 2020-07-17 21:59:18 -07:00
Franck Nijhof 53545c984b
Log lines do not end with a full stop (#37527) 2020-07-05 23:04:19 +02:00
J. Nick Koston 152a80abed
Complete deprecation of hidden attribute (ATTR_HIDDEN) (#37041) 2020-06-23 17:05:32 -05:00
Ville Skyttä 0c5ca3084e
Add and fix type hints (#36501)
* Fix exceptions.Unauthorized.permission type

* Use auth.permission consts more

* Auth typing improvements

* Helpers typing improvements

* Calculate self.state only once
2020-06-06 20:34:56 +02:00
J. Nick Koston 13f4393042
Fix flapping reload tests (#34837) 2020-04-28 22:58:55 -07:00
Ville Skyttä 267d98b5eb
Type hint improvements (#33082) 2020-04-17 11:33:58 -07:00
Franck Nijhof 6d24a65313
Various light test improvements (#34131) 2020-04-13 15:33:04 +02:00
Erik Montnemery 867630a4a7
Remove state when entity is removed from registry (#32184) 2020-03-26 16:33:50 -07:00
Eugenio Panadero fb22f6c301
Add Context support for async_entity removal (#33209)
* Add Context for async_remove

* Check context in state automation on entity removal
2020-03-24 09:59:17 -07:00
Erik Montnemery 7e387f93d6
Add MQTT WS command to remove device (#31989)
* Add MQTT WS command to remove device

* Review comments, fix test

* Fix tests
2020-02-24 20:46:02 -08:00
Paulus Schoutsen 9e7185c676
Write state if schedule update state from async context (#31758)
* Write state if schedule update state from async context

* Fix most tests

* Fix test and PS4 I/O in event loop

* Fix ps4 better
2020-02-13 10:22:06 -08:00
Paulus Schoutsen 51c35ab9a8
Entity Registry to store and restore name/icon (#31714)
* Entity Registry to store and restore name/icon

* Update test_entity_registry.py

* Add original name/icon to JSON result
2020-02-11 09:40:50 -08:00
Paulus Schoutsen 5a0f21cbe3
Adjust entity slow warning for custom component (#31711) 2020-02-10 16:32:47 -08:00
Paulus Schoutsen a3b3924e21
Update link when IO in event loop (#31519) 2020-02-06 11:37:35 +01:00
Paulus Schoutsen e970177eeb
Use entity.async_request_call in service helper (#31454)
* Use entity.async_request_call in service helper

* Clean up semaphore handling

* Address comments

* Simplify call entity service helper

* Fix stupid rflink test
2020-02-04 15:30:15 -08:00
Paulus Schoutsen e9e44dbd97
Fix callback and async (#31281)
* Fix callback and async

* Fix a return

* Fix test

* Fix mqtt tests

* Fix some more callbacks
2020-01-29 13:59:45 -08:00
Paulus Schoutsen 0fba9e44ed
Migrate zone to use collection helpers (#30774) 2020-01-22 12:36:25 -08:00
Paulus Schoutsen b9aba30a6e
Extract Collection helper from Person integration (#30313)
* Add CRUD foundation

* Use collection helper in person integration

* Lint/pytest

* Add tests

* Lint

* Create notification
2020-01-03 21:37:11 +01:00
Ville Skyttä fa4fa30461 Various string cleanups (#30435)
* Remove some unnecessary string concatenations

* Replace some simple str.formats with f-strings

* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Paulus Schoutsen bb14a083f0
Store capabilities and supported features in entity registry, restore registered entities on startup (#30094)
* Store capabilities and supported features in entity registry

* Restore states at startup

* Restore non-disabled entities on HA start

* Fix test

* Pass device class from entity platform

* Clean up restored entities from state machine

* Fix Z-Wave test?
2019-12-31 14:29:43 +01:00
Bas Nijholt 67c56c860d Sort imports according to PEP8 for 'homeassistant' folder (#29789)
Components are already done
2019-12-09 16:42:10 +01:00
Paulus Schoutsen 9771826ed6
Add capability-attributes (#29306) 2019-12-02 11:15:50 -08:00
Paulus Schoutsen 94675ca5a7
Mark entity abc (#28869)
* Mark entity abc

* Use abstractmethod in climate

* Lint
2019-11-19 13:42:09 -06:00
Ville Skyttä 3adac699c7 Note snake_case state attribute name convention in entity docs (#27287)
https://github.com/home-assistant/home-assistant/pull/26675#discussion_r331763063
2019-10-07 08:16:26 -07:00
Robbert Müller 7a156059e9 Switch on/off all lights, and wait for the result (#27078)
* Switch on/off all lights, and wait for the result

Reuses the parallel_updates semaphore.
This is a small crutch which serializes platforms which already do tis
for updates. Platforms which can parallelize everything, this makes it
go faster

* Fix broken unittest

With manual validation, with help from @frenck, we found out that the
assertions are wrong and the test should be failing.

The sequence requested is
OFF
ON

without cancelation, this code should result in:
off,off,off,on,on,on

testable, by adding a `await hass.async_block_till_done()` between the
off and on call.

with cancelation. there should be less off call's so
off,on,on,on

* Adding tests for async_request_call

* Process review feedback

* Switch gather with wait

* 👕 running black
2019-10-06 08:23:12 -07:00
Ville Skyttä f259ff17d5
Type hint additions (#26831)
* Type hint additions

* Remove optional from sidebar_icon comment

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* Remove optional from sidebar_title comment

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* Fix issues after rebase and mypy 0.730
2019-09-29 20:07:49 +03:00
Franck Nijhof b52cfd3409 Add comment for clarity to helper.entity.enabled() (#26793)
* Fixes entity enabled expression

* Ensure True is returned when there is no registry_entity

* Add comment for clarity to helper.entity.enabled()
2019-09-24 14:21:00 -07:00
Franck Nijhof 6f9ccb5434 Add and corrects typehints in Entity helper & core class (#26805)
* Add and corrects typehints in Entity class

* Adjust state type based on comments
2019-09-24 14:20:04 -07:00
Franck Nijhof 2f0eb07624 Migrate legacy typehints in core to PEP-526 (#26403)
* Migrate legacy typehints in core to PEP-526

* Fix one type
2019-09-03 20:36:04 -07:00
SukramJ cf3bb300e6 Fix for 0.98: Don't update disabled entities (Homematic IP Cloud) (#26236)
* Homematic IP Cloud Fix: Don't update disabled entities

* Added enabled to entity.py

* Update test for enabled

* Update entity.py
2019-08-28 13:38:20 -07:00
Franck Nijhof decf13b948 Use literal string interpolation in core (f-strings) (#26166) 2019-08-23 09:53:33 -07:00
Paulus Schoutsen f704a8e90e Reload config entry when entity enabled in entity registry, remove entity if disabled. (#26120)
* Reload config entry when disabled_by updated in entity registry

* Add types

* Remove entities that get disabled

* Remove unnecessary domain checks.

* Attach handler in async_setup

* Remove unused var

* Type

* Fix test

* Fix tests
2019-08-22 19:32:43 -05:00
Paulus Schoutsen aa56b4dd30
Log warning if disabled entities receive updates. (#26143)
* Log warning if disabled entities receive updates.

* Fix test

* Always set entity ID on disabled entities
2019-08-22 14:12:24 -07:00
Paulus Schoutsen 6c292846be
Allow entities to indicate they should be disabled by default (#26011) 2019-08-16 16:17:16 -07:00
Ville Skyttä aa508b5106 Complete some incomplete type hints in helpers (#25953) 2019-08-15 08:53:25 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Ville Skyttä d64f1e767c Type check all helpers (#25373)
* Type check all helpers, add inline exclusions for work in progress

* Remove unused Script._template_cache

* Add some missing type hints

* Remove unneeded type: ignore

* Type hint fixes

* Mypy assistance tweaks

* Don't look for None in deprecated config "at most once" check

* Avoid None name slugify attempt when generating entity id

* Avoid None state store attempt on entity remove
2019-07-21 09:59:02 -07:00
David F. Mulcahey 0653f57fb4 change and condition to or condition (#25374) 2019-07-21 09:57:40 -07:00
Paulus Schoutsen 06af6f19a3
Entity to handle updates via events (#24733)
* Entity to handle updates via events

* Fix a bug

* Update entity.py
2019-06-26 09:22:51 -07:00
Penny Wood 7a9c9031af I think this is a potential bug (#23157) 2019-04-17 09:52:08 -07:00
emontnemery fc81826763 Introduce Entity.async_write_ha_state() to not miss state transition (#21590)
* Copy state in schedule_update_ha_state

* Lint

* Fix broken test

* Review comment, improve docstring

* Preserve order of state updates

* Rewrite

* Break up async_update_ha_state

* Update binary_sensor.py

* Review comments

* Update docstring

* hass -> ha

* Update entity.py

* Update entity.py
2019-03-09 09:52:22 -08:00
Daniel Høyer Iversen 519315f9c8 pylint 2.3.0 (#21485)
* pylint 2.3.0

* remove const

*  disable=syntax-error
2019-02-27 16:10:40 -05:00
Paulus Schoutsen 987b5cd905
Person component: add storage and WS commands (#20852)
* Forbid duplicate IDs

* Allow loading persons from storage

* Convert to PersonManager

* Add storage support and WS commands to Person component

* Convert list command to differentiate types

* Allow loading person component without defining persons

* Fix cleanups after update/delete

* Address comments

* Start tracking when HA started
2019-02-09 10:41:40 -08:00
Adam Mills 5c3a4e3d10 Restore states through a JSON store instead of recorder (#17270)
* Restore states through a JSON store

* Accept entity_id directly in restore state helper

* Keep states stored between runs for a limited time

* Remove warning
2018-11-28 13:16:43 +01:00
Paulus Schoutsen 77bf10e37c
Fix unloading an entry can leave states around (#17786)
* Add test that tests unloading on remove

* Add more test things

* Untangle entity remove code from entity platform

* Don't add default implementation of async_will_remove

* Keep entity weakref alive
2018-10-25 19:57:36 +02:00
Paulus Schoutsen e903f7ffda Manual updates (#17278) 2018-10-09 16:54:38 +02:00
cdce8p 3b5e5cbcd6 Async syntax 5, light & lock & remote & scene & telegram & helpers (#17019) 2018-10-01 08:56:50 +02:00
Ville Skyttä ee696643cd Isort preparations (#16555)
* Don't treat typing as an "in-between" module for import order

That was a < 3.5 era thing.

* Tighten scope of some pylint unused-import disables

To avoid isort moving a top level one around, undesirably broadening its
scope.
2018-09-11 11:21:48 +02:00
Robert Svensson 97173f495c Device registry store config entry (#16152)
* Allow device registry to optionally store config entries

* Connections and identifiers are now sets with tupels

* Make config entries mandatory

* Fix duplicate keys in test

* Rename device to device_info

* Entity platform should only create device entries if config_entry_id exists

* Fix Soundtouch tests

* Revert soundtouch to use self.device

* Fix baloobs comments

* Correct type in test
2018-08-25 10:59:28 +02:00
Ville Skyttä dd9d53c83e Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 (#14557)
* Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0

* Pydocstyle D401 fixes
2018-08-24 10:28:43 +02:00
Robert Svensson 0009be595c Device Registry (#15980)
* First draft

* Generate device id

* No obscure registry

* Dont store config_entry_id in device

* Storage

* Small mistake on rebase

* Do storage more like entity registry

* Improve device identification

* Add tests

* Remove deconz device support from PR

* Fix hound comments, voff!

* Fix comments and clean up

* Fix proper indentation

* Fix pydoc issues

* Fix mochad component to not use self.device

* Fix mochad light platform to not use self.device

* Fix TankUtilitySensor to not use self.device

* Fix Soundtouch to not use self.device

* Fix Plex to not use self.device

* Fix Emby to not use self.device

* Fix Heatmiser to not use self.device

* Fix Wemo lights to not use self.device

* Fix Lifx to not use self.device

* Fix Radiotherm to not use self.device

* Fix Juicenet to not use self.device

* Fix Qwikswitch to not use self.device

* Fix Xiaomi miio to not use self.device

* Fix Nest to not use self.device

* Fix Tellduslive to not use self.device

* Fix Knx to not use self.device

* Clean up a small mistake in soundtouch

* Fix comment from Ballob

* Fix bad indentation

* Fix indentatin

* Lint

* Remove unused variable

* Lint
2018-08-22 10:46:37 +02:00