* Don't enable any variants of the daylight sensor entities by default
* Use isinstance rather than doing ZHATYPE compare
* Accidentally removed an import
* Optimize _get_states_with_session
* Move custom filters to derived table
* Remove useless derived table
* Filter old states after grouping
* Split query
* Add comments
* Simplify state update period criteria
* Only apply custom filters if we didn't get an include list of entities
Co-authored-by: J. Nick Koston <nick@koston.org>
* Explictly close the TPLink SmartDevice protocol on unload
- There is a destructor that will eventually do this when
the object gets gc. Its better to explictly do it at
unload.
* fix coro mock
* Add Amber Electric integration
* Linting
* Fixing some type hinting
* Adding docstrings
* Removing files that shouldn't have been changed
* Splitting out test helpers
* Testing the price sensor
* Testing Controlled load and feed in channels
* Refactoring mocks
* switching state for native_value and unit_of_measurement for native_unit_of_measurement
* Fixing docstrings
* Fixing requiremennts_all.txt
* isort fixes
* Fixing pylint errors
* Omitting __init__.py from test coverage
* Add missing config_flow tests
* Adding more sensor tests
* Applying suggested changes to __init.py__
* Refactor coordinator to return the data object with all of the relevent data already setup
* Another coordinator refactor - Better use the dictionary for when we build the sensors
* Removing first function
* Refactoring sensor files to use entity descriptions, remove factory
* Rounding renewable percentage, return icons correctly
* Cleaning up translation strings
* Fixing relative path, removing TODO
* Coordintator tests now accept new (more accurate) fixtures
* Using a description placeholder
* Putting missing translations strings back in
* tighten up the no site error logic - self._site_id should never be None at the point of loading async_step_site
* Removing DEVICE_CLASS, replacing the units with AUD/kWh
* Settings _attr_unique_id
* Removing icon function (it's already the default)
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Adding strings.json
* Tighter wrapping for try/except
* Generating translations
* Removing update_method - not needed as it's being overriden
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Fixing tests
* Add missing description placeholder
* Fix warning
* changing name from update to update_data to match async_update_data
* renaming [async_]update_data => [async_]update_price_data to avoid confusion
* Creating too man renewable sensors
* Override update method
* Coordinator tests use _async_update_data
* Using $/kWh as the units
* Using isinstance instead of __class__ test. Removing a zero len check
* Asserting self._sites in second step
* Linting
* Remove useless tests
Co-authored-by: jan iversen <jancasacondor@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Add WS API for removing statistics for a list of statistic_ids
* Refactor according to code review, enable foreign keys support for sqlite
* Adjust tests
* Move clear_statistics WS API to recorder
* Adjust tests after rebase
* Update docstring
* Update homeassistant/components/recorder/websocket_api.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Adjust tests after rebase
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Modernize dlna_dmr component: configflow, test, types
* Support config-flow with ssdp discovery
* Add unit tests
* Enforce strict typing
* Gracefully handle network devices (dis)appearing
* Fix Aiohttp mock response headers type to match actual response class
* Fixes from code review
* Fixes from code review
* Import device config in flow if unavailable at hass start
* Support SSDP advertisements
* Ignore bad BOOTID, fix ssdp:byebye handling
* Only listen for events on interface connected to device
* Release all listeners when entities are removed
* Warn about deprecated dlna_dmr configuration
* Use sublogger for dlna_dmr.config_flow for easier filtering
* Tests for dlna_dmr.data module
* Rewrite DMR tests for HA style
* Fix DMR strings: "Digital Media *Renderer*"
* Update DMR entity state and device info when changed
* Replace deprecated async_upnp_client State with TransportState
* supported_features are dynamic, based on current device state
* Cleanup fully when subscription fails
* Log warnings when device connection fails unexpectedly
* Set PARALLEL_UPDATES to unlimited
* Fix spelling
* Fixes from code review
* Simplify has & can checks to just can, which includes has
* Treat transitioning state as playing (not idle) to reduce UI jerking
* Test if device is usable
* Handle ssdp:update messages properly
* Fix _remove_ssdp_callbacks being shared by all DlnaDmrEntity instances
* Fix tests for transitioning state
* Mock DmrDevice.is_profile_device (added to support embedded devices)
* Use ST & NT SSDP headers to find DMR devices, not deviceType
The deviceType is extracted from the device's description XML, and will not
be what we want when dealing with embedded devices.
* Use UDN from SSDP headers, not device description, as unique_id
The SSDP headers have the UDN of the embedded device that we're interested
in, whereas the device description (`ATTR_UPNP_UDN`) field will always be
for the root device.
* Fix DMR string English localization
* Test config flow with UDN from SSDP headers
* Bump async-upnp-client==0.22.1, fix flake8 error
* fix test for remapping
* DMR HA Device connections based on root and embedded UDN
* DmrDevice's UpnpDevice is now named profile_device
* Use device type from SSDP headers, not device description
* Mark dlna_dmr constants as Final
* Use embedded device UDN and type for unique ID when connected via URL
* More informative connection error messages
* Also match SSDP messages on NT headers
The NT header is to ssdp:alive messages what ST is to M-SEARCH responses.
* Bump async-upnp-client==0.22.2
* fix merge
* Bump async-upnp-client==0.22.3
Co-authored-by: Steven Looman <steven.looman@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update config_flow.py
* Switchbot Config_flow discover mac instead of needing to type it.
* Do not show already configured devices in config flow, abort if no unconfigured devices.
* Apply suggestions from code review
Co-authored-by: J. Nick Koston <nick@koston.org>
* Move MAC to top of config flow form dict.
* Update homeassistant/components/switchbot/config_flow.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add support for multilevel switch CC select entities
* Use state names from docs and include more device identifiers from device DB
* black
* pylint
* type fix
* Add failure scenario test
* Update homeassistant/components/zwave_js/select.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Use SurePetcareEntity for surepetcare binary sensor
Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
* tests
Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
* Reuse zwave_js device when a removed node is replaced with the same node
* Ensure change is backwards compatible with servers that don't include replaced
* Remove lambda
* Add assertions to remove type ignores
* fix tests by always copying state and setting manufacturer/label attributes
* Add state_class=measurement and use SensorEntityDescriptions
* Use attributes from entity_description
* Improvements
* Adress remarks
* Revert changes to fan
* move method
* Fix tests
* Revert fan/__init__.py
* Revert key change
* Set default percentage in turn_on
* del PowerLevelController, ena fan PowerController
* Use AlexaRangeContoller for speed or default
* Update tests
* no-else-return
* Avoid cases with only one preset_mode
* Only report ghost_mode to Alexa - fix bug
* Add some tests for patched code
* pylint
* pylint and tests with one preset_mode
* correct ghost preset mode check in test
* add tests for RangeController
* ghost preset_mode locale agnostic
* isort
* Update homeassistant/components/alexa/capabilities.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/alexa/entities.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/alexa/entities.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/alexa/entities.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/alexa/entities.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update entities.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Require last_reset attribute to be set for measurement state_class
* Tweak
* Improve tests
* Lint
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add dict of attributes to initialize
* Refactor get_attributes() method
Read 5 attributes at the time.
* Add ZCL_INIT_ATTRS attribute to base Zigbee channel
* Update tests and general clusters
* Update channels to use ZCL_INIT_ATTRS
* Update channels to use ZCL_INIT_ATTRS
* Fix tests
* Refactor async_initialize() to be a retryable request
* Maky pylint happy again
This avoids calling the tado servers unnecessarily many times, especially for bigger homes. This is done by calling aggregating endpoints instead of iterating over the zones and devices and calling endpoints over and over.
* Remove redundant aiohttp response status=200 kwargs
* Remove some more in h.c.auth
* Restore explicit status=HTTP_OK for auth and webhook per review request
* Add siren.py
* Working siren platform with 100% test coverage
* Also add test file...
* Add test to verify that switch platform cleans up legacy entities now that sirens are their own platform
* Update homeassistant/components/deconz/siren.py
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
Mostly snake case conversions and typing
But also a change in retry mechanism
Added a more complete set_* call to most types to remove the direct relation to rest API of deCONZ
* Secure update is called when integration is started.
* Review comments.
* Update homeassistant/components/modbus/base_platform.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/modbus/base_platform.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Refactor HVAC channel to use zigpy cached attributes
* Allow named attributes in ZHA test attribute reports
* Let attribute write to update cache
* WIP Update tests
* Cleanup
* Add helper
* Add device actions
* Add trigger
* Just make use of standard command
* Generalize code a bit
* Switch tests to currently existing features
* Add tests for capabilities
* Don't check schema asserted value
* Adjust strings somewhat
* Directly expose action subtypes
* Add a status event test
* Switch to modern typing
* Drop chime that is now part of command
* Adjust strings a bit
* Drop ability to set custom value
* Adjust changed base schema
* Validate triggers
* Try fix typing for 3.8
* Add phone_modem integration
* Use original domain
* Add init tests for Modem Caller ID
* Clean up tests
* Clean up tests
* apply suggestions
* Fix tests
* Make only one instance possible
* Allow more than 1 device and remove hangup service
* simplify already configured
* Update sensor.py
* Update config_flow.py
* Fix manifest
* More cleanup
* Fix tests
* Ue target
* Clean up sensor.py
* Minor tweaks
* Close modem on restart and unload
* Update requirements
* fix tests
* Bump phone_modem
* rework
* add typing
* use async_setup_platform
* typing
* tweak
* cleanup
* fix init
* preserve original name
* remove callback line
* use list of serial devices on host
* tweak
* rework
* Rework for usb dicsovery
* Update requirements_test_all.txt
* Update config_flow.py
* tweaks
* tweak
* move api out of try statement
* suggested tweaks
* clean up
* typing
* tweak
* tweak
* async name the service
* Add Whirlpool integration
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Apply suggestions from code review
* Fix lint
* Fix lint and tests
* Apply suggestions from code review
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use dict lookups
* Lint
* Apply code changes from PR review
* Do real integration setup in tests
* Apply suggestions from review & fix test
* Replace get with array operator
* Add suggestions from code review
* Rename test var
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
* initial commit
* use new release
* Update for sensors
* big update
* pylint fixes, bump dependancy to 2021.8.2
* New version to try to fix the tests
* Fix a lot of errors, bump version
* more work
* Bump version
* Adde dimmer support
* Make sure the counters are useable in the energy dashboard
* bump version
* Fix testcases
* Update after review
* Bump version to be able to have some decent exception catches, add the temperature device class
* Readd the import of the platform from config file, but add a deprecation warning
* More comments updated
* Fix lefover index
* Fix unique id to be backwards compatible
* Fix small bug in covers
* Fix testcases
* Changes for theenery dashboard
* Fixed services
* Fix memo text
* Make the interface for a service the port string instead of the device selector
* Fix set_memo_text
* added an async scan task, more comments
* Accidently disabled some paltforms
* More comments, bump version
* Bump version, add extra attributes, enable mypy
* Removed new features
* More comments
* Bump version
* Update homeassistant/components/velbus/__init__.py
Co-authored-by: brefra <frank_van_breugel@hotmail.com>
* Readd the import step
Co-authored-by: brefra <frank_van_breugel@hotmail.com>
* Move parts of ssdp to async_upnp_client
* Fix test for environments with multiple sources
* Fix sonos tests
* More fixes/changes
* More fixes
* Use async_upnp_client==0.21.0
* Pylint/test fixes
* More changes after review
* Fix tests
* Improve testing
* Fix mypy
* Fix yamaha_musiccast tests?
* Changes after review
* Pylint
* Reduce calls to combined_headers
* Update to async_upnp_client==0.21.1
* Update to async_upnp_client==0.21.2
* use as_dict
Co-authored-by: J. Nick Koston <nick@koston.org>
* Handle new entity creation when a new value is added
* spacing
* Update homeassistant/components/zwave_js/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* change variable name and use asyncio.gather
* Centralized where discovered value IDs gets managed
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>