* 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>
* 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
* 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.
* 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>
* Define ToggleEntity entity attributes as class variables
* Fix upcloud overriding state property
* Implement available state for upcloud, to compensate removed state
* 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
* 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>
* 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
* 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
* Fix exceptions.Unauthorized.permission type
* Use auth.permission consts more
* Auth typing improvements
* Helpers typing improvements
* Calculate self.state only once
* Use entity.async_request_call in service helper
* Clean up semaphore handling
* Address comments
* Simplify call entity service helper
* Fix stupid rflink test
* 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?
* 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
* 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
* 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
* 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
* 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
* 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
* 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.
* 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
* 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