* Add config flow to Streamlabs water
* Add config flow to Streamlabs water
* Add config flow to Streamlabs water
* Add issue when import is successful
* Remove import issue when entry already exists
* Remove import issue when entry already exists
* Fix feedback
* Fix feedback
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* initial work on alarm
* final work on alarm
* coveragerc
* add tests
* add code validation
* remove sensor changes for a dedicated PR
* code optimization and cleanup
* tweaks
* tweak #2
* apply suggestion
* code quality
* code quality #2
* fix cover.py
* api typing
* use base classes where possibile
* apply const as per review comment
* cleanup unload entry
* apply review comments
* Add config flow to Netgear LTE
* uno mas
* uno mas
* forgot one
* uno mas
* uno mas
* apply suggestions
* tweak user step
* fix load/unload/dep
* clean up
* fix tests
* test yaml before importing
* uno mas
* uno mas
* uno mas
* uno mas
* uno mas
* fix startup hanging
* break out yaml import
* fix doc string
---------
Co-authored-by: Robert Resch <robert@resch.dev>
* Add debouncer
* Avoid having 3 calls
* Debounce causes extra refresh in reload window
* Seperate disabled test to avoid latent refresh
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add select platform to drop_connect integration
* Fix select test
* Fix minor issues
* Make function definition more specific
* Revert change to switch.py for inclusion in separate PR
* Improve typing
* Add translation keys for select options
* Fix set function typing
* Remove redundant value check
* Remove args that match defaults
* Add diagnostics to ccm15
* Update homeassistant/components/ccm15/diagnostics.py
Co-authored-by: J. Nick Koston <nick@koston.org>
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add energy usage sensor to A. O. Smith integration
* Address review comments
* Address review comment
* Address review comment
* Create device outside of the entity class
* Address review comment
* remove platinum
* Add switches to drop_connect integration
* Let device update state
* Simplify icon property
* Use constants for icon names
* Add simulated responses from devices
* Use keyed form for switch value
* Clean up properties
* Fix mqtt valve is not resetting opening or closing state
* Require state or position attr in JSON state update
* Do not change `_attr_is_closed` if valve reports a position
* Add comment, use tuple
* Call _update_state
* Add DROP integration
* Remove all but one platform for first PR
* Simplify initialization of hass.data[] structure
* Remove unnecessary mnemonic 'DROP_' prefix from DOMAIN constants
* Remove unnecessary whitespace
* Clarify configuration 'confirm' step description
* Remove unnecessary whitespace
* Use device class where applicable
* Remove unnecessary constructor and change its elements to class variables
* Change base entity inheritance to CoordinatorEntity
* Make sensor definitions more concise
* Rename HA domain from drop to drop_connect
* Remove underscores from class and function names
* Remove duplicate temperature sensor
* Change title capitalization
* Refactor using SensorEntityDescription
* Remove unnecessary intermediate dict layer
* Remove generated translations file
* Remove currently unused string values
* Use constants in sensor definitions
* Replace values with constants
* Move translation keys
* Remove unnecessary unique ID and config entry references
* Clean up DROPEntity initialization
* Clean up sensors
* Rename vars and functions according to style
* Remove redundant self references
* Clean up DROPSensor initializer
* Add missing state classes
* Simplify detection of configured devices
* Change entity identifiers to create device linkage
* Move device_info to coordinator
* Remove unnecessary properties
* Correct hub device IDs
* Remove redundant attribute
* Replace optional UID with assert
* Remove redundant attribute
* Correct coordinator initialization
* Fix mypy error
* Move API functionality to 3rd party library
* Abstract device to sensor map into a dict
* Unsubscribe MQTT on unload
* Move entity device information
* Make type checking for mypy conditional
* Bump dropmqttapi to 1.0.1
* Freeze dataclass to match parent class
* Fix race condition in MQTT unsubscribe setup
* Ensure unit tests begin with invalid MQTT state
* Change unit tests to reflect device firmware
* Move MQTT subscription out of the coordinator
* Tidy up initializer
* Move entirety of MQTT subscription out of the coordinator
* Make drop_api a class property
* Remove unnecessary type checks
* Simplify some unit test asserts
* Remove argument matching default
* Add entity category to battery and cartridge life sensors
* Add media platform
* Add more props
* Fix platform filename
* Working
* Add a test
* Update test and fixture
* Refactor media player properties to handle null values
* Add comments
* add more assertions
* Fix test docstring
* Use walrus instead.
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Test when media player is idle
* Fix tests
* Remove None type from volume_level
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Return media position only when a media duration is > 0
* Remove impossible None type
* Add snapshot and freezer
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Skeleton for Vogel's MotionMount support.
* Generated updates.
* Add validation of the discovered information.
* Add manual configuration
* Use a mac address as a unique id
* Add tests for config_flow
* Add a 'turn' sensor entity.
* Add all needed sensors.
* Add number and select entity for control of MotionMount
* Update based on development checklist
* Preset selector now updates when a preset is chosen
* Fix adding presets selector to device
* Remove irrelevant TODO
* Bump python-MotionMount requirement
* Invert direction of turn slider
* Prepare for PR
* Make sure entities have correct values when created
* Use device's mac address as unique id for entities.
* Fix missing files in .coveragerc
* Remove typing ignore from device library.
Improved typing also gave rise to the need to improve the callback mechanism
* Improve typing
* Convert property to shorthand form
* Remove unneeded CONF_NAME in ConfigEntry
* Add small comment
* Refresh coordinator on notification from MotionMount
* Use translation for entity
* Bump python-MotionMount
* Raise `ConfigEntryNotReady` when connect fails
* Use local variable
* Improve exception handling
* Reduce duplicate code
* Make better use of constants
* Remove unneeded callback
* Remove other occurrence of unneeded callback
* Improve removal of suffix
* Catch 'getaddrinfo' exception
* Add config flow tests for invalid hostname
* Abort if device with same hostname is already configured
* Make sure we connect to a device with the same unique id as configured
* Convert function names to snake_case
* Remove unneeded commented-out code
* Use tuple
* Make us of config_entry id when mac is missing
* Prevent update of entities when nothing changed
* Don't store data in `hass.data` until we know we will proceed
* Remove coordinator
* Handle situation where mac is EMPTY_MAC
* Disable polling
* Fix failing hassfest
* Avoid calling unique-id-less discovery handler for situations where we've an unique id
* Add number platform
* Make self.set consistent
* Fix test docstring
* Use entity descriptions
* Add patch_description to tests
* Rename argument to arg
* Make max key mandatory
* Set SOC min to normal value
* add config flow
* unit tests
* yaml config import flow
* change deprecation period and simply code
* keep name for legacy yaml
- removing the name now would break current implementations
- it will be removed together with the deprectation of yaml config flow
* improve error handling, simpler unique_id, cleanup
* simplify issues for yaml import flow
* improve typing and clean name handling
* streamline unit tests
- happy path + errors
- mock opendata instead of aiohttp
* parametrize unit tests
* improve strings
* add missing aborts
* update coverage ignore
* remove redundant test
* minor clean up of constants
* Improve performance of dhcp on high activity networks
Most of the overhead was constructing IPAddress objects
which is solved with https://github.com/bdraco/cached-ipaddress
* fix test
* fix: bump
* bump again
* lets do it on the correct branch
* 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