* added keyboard event type to keyboard_remote
* fix emulated hold event
* Update homeassistant/components/keyboard_remote/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* removed event value
* set key_hold to use string constant
* don't use dict.get() for keyboard event type
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Apply code cleanup suggestions from previous PRs
* Update homeassistant/components/speedtestdotnet/const.py
Co-authored-by: Franck Nijhof <git@frenck.dev>
* fix native_value, and ping value in test
* use self._state instead of _attr_native_value
* update identifiers and add more tests
Co-authored-by: Franck Nijhof <git@frenck.dev>
* Catch ConnectionError and retry
* Add unload and reload functionality
* Update listener on retry
* Call reload directly and await
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
* 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 state_class measurements in wiffi integration
* use new STATE_CLASS_TOTAL_INCREASING for metered entities
like
- amount of rainfall per hour/day
- rainfall hours per day
- sunshine hours per day
* Update homeassistant/components/wiffi/sensor.py
Co-authored-by: Greg <greg.diehl.gtd@gmail.com>
Co-authored-by: Greg <greg.diehl.gtd@gmail.com>
* add additional sensor types for airthings devices
* remove "out of ten" unit
* change unit on rssi
* remove device class for light
* disable by default
* 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
* Bump version, move the cache-dir to the home-assistant config
* Moved the cahce into the storage dir
* Bump version, 2021.9.3 will use pathlib
* Bump version to 2021.9.4
* Clean config path
* Remove leading slash
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 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>