* Refactor rate limit helper to track time in seconds
Currently we created datetime and timedelta objects to enforce the
rate limit. When the rate limit was being hit hard, this got expensive.
We now use floats everywhere instead as they are much cheaper which
is important when we are running up against a rate limit, which is
by definition a hot path
The rate limit helper is currently only used for templates and
we do not have any code in the code base that directly passes
in a rate limit so the impact to custom components is expected
to be negligible if any
* misesd two
* Cache parsing the url for the device registry
There are lots of hub integrations that use the same url for every
sub-device which results in a lot of url parsing at startup. The
logic can be simplified quite a bit here by only using yarl
for URLs
* fix onvif
* Deprecate cloud tts gender option
* Update http api and prefs
* Test migration of prefs to minor version 4
* Adjust breaking date
* Add test for bad voice in http api
* Flatten tts info
* Fix comments
* Fix comment date
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Clarify voice validator
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Reduce overhead to write dlna_dmr state
- Only update supported_features once per state write cycle
- Use a dict lookup for state
* useless dispatch
* fix tests
* remove unreachable code
* update to 1.18.5 and add Brand to config, required for getting shared appliances
* update version to 0.18.6
* start fixing tests
* fix typo
* check for falsy values instead of explicit None
* move CONF_BRAND from global constants to whirlpool constants
* add test for no brand, fix __init__ import
* add brand to string.json
* add brand to re-auth
* add title/description, add brand info to description
* add reauth strings
* pass already initialized data dict
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* remove trailing comma
* Update strings again
* fix reauth tests to add brand
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Allow retries on SerialException, AuroraError
* Add test to verify that retry is occuring
* Fix tests and indents
* Only log to info level for normal on/offline
* Review comment: don't log warning, debug and raise UpdateFailed
* Fix tests
* Refactor setup time tracking to exclude time waiting on other operations
We now exclude the import time and th time waiting on
base platforms to setup from the setup times
* tweak
* tweak
* tweak
* tweak
* adjust
* fixes
* fixes
* preen
* preen
* tweak
* tweak
* adjust
* tweak
* reduce
* do not count integrtion platforms against their parent integration
* handle legacy tts platforms
* stt as well
* one more wait
* use the same pattern in all the legacy
* fix tts and stt legacy
* fix
* fix
* reduce
* preen
* entity comp does not wait for platforms
* scene blocks as well
* fix test
* test fixes
* coverage
* coverage
* coverage
* fix test
* Update tests/test_setup.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/test_setup.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/setup.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* strip
* strip WAIT_PLATFORM_INTEGRATION
* strip WAIT_PLATFORM_INTEGRATION
* strip WAIT_PLATFORM_INTEGRATION
* strip WAIT_PLATFORM_INTEGRATION
* remove complexity
* Apply suggestions from code review
* no longer works that way
* fixes
* fixes
* fixes
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add Config Flow for Rova component
* Add tests for Rova config flow
* Fix data type
* Add rova to requirements for tests
* Removed seperate function for area check and global variable
* Add unique name and id to rova entities
* Add support for multiple rova entries
* Fix correct error after connection timeout or http error
* Revert SENSOR_TYPES update
* Add existing rova configuration from yaml as new entity
* Add tests for import configuration.yaml flow
* Cleanup code
* Update valid rova area check in config flow
* Changed abort keys and messages
* Updated using self.add_suggested_values_to_schema
* Update to pass tests
* Added missing strings
* Update sensor unique_ids
* Fix service name formatting
* Update tests for Rova entry
* Update tests to recover after error
* Update test name
* Apply suggestions from code review
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add 3 new buttons
- System shutdown button
- System reboot button
- Octoprint restart button
* Enable buttons by default
* Add tests
* Fix tests
* Remove accidentally committed unused code
* Add RESTART device class to RestartOctoprint and RebootSystem buttons
* Apply suggestions to octoprint test_button
* Freeze time for OctoPrint button tests
* Make new button base class to prevent implementing the availability check multiple times
* Expose sleep config getters and setters
* Add a switch for toggling sleep schedule
* Add Time platform
* Add frozen to dataclasses
* Update tests
* Add starlink time to coveragerc
* No more mixin
* Update time.py
* Update time.py
* Run data collectors asynchronously
* Fix timezone handling
* Move legacy device_tracker setup to a tracked task
Legacy platforms are now loaded in a tracked task which
allows anything waiting on device_tracker (such as
a config entry that uses the device_tracker
platform) to proceed.
This also allows us to remove the workaround
of adding device_tracker to
hass.config.components in its setup
* tweak
* tweak
* fix tests
* Replace pylint pointless-statement with ruff B018
* fix occurrences of B018
* disable pylint expression-not-assigned as well
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add more sensors
* Fix coverage
* Dont do this rename yet
* Fix case
* Update snapshot
* Add icons
* Remove unused icons
* Update snapshot
* Remove last_value logic from TimeSensor
* Apply suggestions from code review
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update constant case
* Remove useless test
* Add refresh test back
* Add assertion to post coordinator refresh
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>