* Migrate cloud stt to config entry
* Update default engine
* Test config flow
* Migrate pipelines with cloud stt engine to new engine id
* Fix test after rebase
* Update and add comment
* Remove cloud specifics from default stt engine
* Refactor cloud assist pipeline
* Fix cloud stt entity_id
* Try to wait for platforms before creating default pipeline
* Clean up import
* Move function in cloud assist pipeline
* Wait for tts platform loaded in stt migration
* Update deprecation dates
* Clean up not used fixture
* Add test for async_update_pipeline
* Define pipeline update interface better
* Remove leftover
* Fix tests
* Change default engine test
* Add test for missing stt entity during login
* Add and update comments
* Update config entry title
* Add version platform
* Add strings and test
* Remove potential for None
* Dont show progress when no update is running
* Return None for no update
* Add comment
* Remove future feature
* WIP
* Fix statuses
* update fixture
* Remove entity name
* Remove name correctly
* Use False for in_progress
* Migrate google related tests to use freezegun
* retrigger CI
* Fix google tests
* Add timezone to config_entry_token_expiry
* Separate config_entry_token_expiry from token_expiry
* Also test token refresh for offset-naive tokens
* retrigger CI
* Apply code review suggestion
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Run ruff-format
---------
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Add climate platform
* Other fixes
* Use super native value
* change to _value
* Sentence case strings
* Add some more type definition
* Add return types
* Add some more assertions
* Remove VirtualKey error
* Add type to args
* rename climate to primary
* fix min max
* Use String Enum
* Add PRECISION_HALVES
* Fix string enum
* fix str enum
* Simplify run logic
* Rename enum to TessieClimateKeeper
* Add mqtt valve platform
* No stop topic-reports_position and validation
* Do not allow state_open, state_closed with position reporing valve
* Allow open/close feature to be disabled
* Follow up comments
* Rename
* Apply defaults in validator
* Update docstr
* Remove devices that no longer exist
* Run Black after merge
* config 2 devices then 1 devices
* clean up device assertions
* More generic device check
* Add request from Honeywell PR
* remove unnecesary test
optimize dont_remove
* remove unnecessary test
* Actually test same id different domain
* Test correct id
* refactor remove test
* Remove .get for non optional keys
* Comprehension for all_device_ids
* Fix DR test, remove `remove`
* fix entities for full test coverage
* remove unused variable assignment
* Additional assertions confirming other domain
* Assertion error
* new method for identifier loop
* device_entries for lists
* ✨ Implement optional API token in config-flow + options
to make the data download from an authenticated path in ESIOS server
As this is an *alternative* access, and current public path works for the PVPC,
no user (current or new) is compelled to obtain a token,
and it can be enabled anytime in options, or doing the setup again
When enabling the token, it is verified (or "invalid_auth" error),
and a 'reauth' flow is implemented, which can change or disable the token if
it starts failing.
The 1st step of config/options flow adds a bool to enable this private access,
- if unchecked (default), entry is set for public access (like before)
- if checked, a 2nd step opens to input the token, with instructions
of how to get one (with a direct link to create a 'request email').
If the token is valid, the entry is set for authenticated access
The 'reauth' flow shows the boolean flag so the user could disable a bad token
by unchecking the boolean flag 'use_api_token'
* ♻️ Remove storage of flag 'use_api_token' in config entry
leaving it only to enable/disable the optional token in the config-flow
* ♻️ Adjust async_update_options
* ✨ Add new price sensors with API token access
New price sensors added:
- Injection price: price of excess energy from self-consumption
- OMIE price: electricity price in the 'open' market
- MAG price: Temporal tax cost for gas compensation
* ✅ Adapt tests to work with multiple sensors
* 🐛 Fix all integration sensors going unavailable
when any sensor lacks data for the current day (usually the 'OMIE price')
* Fix rebase
* Customize icons and display precision for new sensors
* Disable MAG Tax and OMIE price sensors by default
* Move logic to assign sensor unique ids to integration
* Move helper functions to helpers.py
* Fix sensor activation for API download
* Add Valve integration.
This adds the valve integration discussed in https://github.com/home-assistant/architecture/discussions/975
Most of the code is taken from the cover integration but simplified since valves
can't tilt.
There are a couple outstanding errors I'm not sure how to solve and prevents
me from even making this commit without `--no-verify`.
* Apply PR feedback
* Apply more feedback: Intruduce the bare minimum
* Remove file commited by mistake
* Hopefully this fixes tests
* Match cover's typing and mypy settings
* Change some configuration files
* Fix test
* Increase code coverage a little
* Code coverate inproved to 91%
* 95% code coverage
* Coverate up to 97%
* Coverage 98%
* Apply PR feedback
* Even more feedback
* Add line I shouldn't have removed
* Derive closed/open state from current position
* Hopefully last feedback
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove unnecesary translation
* Remove unused method arguments
* Complete code coverage
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Simplify tests
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Apply last feedback
* Update tests/components/valve/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/valve/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/testing_config/custom_components/test/valve.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* More feedback
* Apply suggestion
* And more feedback
* Apply feedback
* Remove commented code
* Reverse logic to unindent
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Implement stop valve for Mock valve
* Fix tests now that I've implemented stop_valve
* Assert it's neither opening nor closing
* Use current position instead
* Avoid scheduling executor when opening or closing
* Fix incorrect bitwise operation
* Simplify toggle
* Remove uneeded partial functions
* Make is_last_toggle_direction_open private
* Remove valve from test custom integration
* Improve test coverage
* Address review comments
* Address review comments
* Address review comments
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
* Change IR from light to switch
* Remove old entity
* Add test
* Apply suggestions from code review
Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
---------
Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
Reduce overhead connect dispatcher
- We tend to have 1000s (or 10000s) of connected dispatchers which
makes these prime targets to reduce overhead/memory
- Instead of creating new functions to wrap log exceptions each time
use partials which reuses the function body and only create new
arguments
Previous optimizations #103307#93602
* Add device state for additional diagnostics
* Add state test and fix existing tests
* Utilize IntEnum and dict for state lookup
* Update aiounifi to v68
* chore(sunweg): minor requested changes
* test(sunweg): use of fixtures
* feat(sunweg): provide bad auth result on expired authentication
* chore(sunweg): bump version
* chore(sunweg): removed reauth
* chore(sunweg): removed features out of scope
* chore(sunweg): fixtures moved to conftest.py
* chore(sunweg): devicetype moved to const
* chore(sunweg): conftest comment
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Allow multiple configs.
* Rename test configs.
* Remove unused property
* Merge branch 'dev' into srp_energy_202307.coordinator
* Use title in device name.