* NEST - Issues with lost internet connectivity #70479
Update Climate and Sensor entities to be unavailable when the device connectivity trait indicates the device is offline.
The prior behavior, the last known values would be displayed indefinitely if the device lost internet connectivity. This was creating the illusion that the device was still connected. With this change, the Home Assistant entities will become unavailable when the device loses connectivity.
* Update formatting
* Add doc strings, fix indentation
* Fix doc strings
* Update test_climate_sdm.py
* Update test_climate_sdm.py
* Update test_sensor_sdm.py
* Update test_sensor_sdm.py
* more formatting fixes
* Place availability logic in mixin
1. Consolidate repeated code into mixin and apply mixin to Climate and Sensor entities
2. Return true instead of super.available()
3. No unit test changes required to maintain code coverage
* Define self._device is mixin to make linter happier
* Remove logger used for debugging
* restore whitespace
* Fix test due to underlying merge change
* Update availability_mixin.py
* Move availability logic into device_info
* Update sensor_sdm.py
* Add Config Flow to APCUPSd integration and remove YAML support.
* Hide the binary sensor if user does not select STATFLAG resource.
* Add tests for config flows.
* Simplify config flow code.
* Spell fix.
* Fix pylint warnings.
* Simplify the code for config flow.
* First attempt to implement import flows to suppport legacy YAML configurations.
* Remove unnecessary log calls.
* Wrap synchronous update call with `hass.async_add_executor_job`.
* Import the YAML configurations when sensor platform is set up.
* Move the logger call since the variables are not properly set up.
* Add codeowner.
* Fix name field of manifest.json.
* Fix linting issue.
* Fix incorrect dependency due to incorrect rebase.
* Update codeowner and config flows via hassfest.
* Postpone the deprecation warning to 2022.7.
* Import future annotations for init file.
* Add an newline at the end to make prettier happy.
* Update github id.
* Add type hints for return types of steps in config flow.
* Move the deprecation date for YAML config to 2022.12.
* Update according to reviews.
* Use async_forward_entry_setups.
* Add helper properties to `APCUPSdData` class.
* Add device_info for binary sensor.
* Simplify config flow.
* Remove options flow strings.
* update the tests according to the changes.
* Add `entity_registry_enabled_default` to entities and use imported CONF_RESOURCES to disable entities instead of skipping them.
* Update according to reviews.
* Do not use model of the UPS as the title for the integration.
Instead, simply use "APCUPSd" as the integration title and let the device info serve as title for each device instead.
* Change schema to be a global variable.
* Add more comments.
* Rewrite the tests for config flows.
* Fix enabled_by_default.
* Show friendly titles in the integration.
* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.
* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.
* Update comments in test files.
* Use parametrize instead of manually iterating different test cases.
* Swap the order of the platform constants.
* Avoid using broad exceptions.
* Set up device info via `_attr_device_info`.
* Remove unrelated test in `test_config_flow`.
* Use `DeviceInfo` instead of dict to assign to `_attr_device_info`.
* Add english translation.
* Add `async_create_issue` for deprecated YAML configuration.
* Enable UPS status by default since it could show "online, charging, on battery etc" which is meaningful for all users.
* Apply suggestions from code review
* Apply suggestion
* Apply suggestion
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix EZVIZ spelling case
The vendor seems consistent about all-uppercase spelling, so let's
follow suit.
* Revert changes to translations other than English
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add MQTT debug_info to dataclass
* Remove total attr, assign factory
* Rename typed dict to MqttDebugInfo and use helper
* Split entity and trigger debug info
* Refactor
* More rework
* Add nibe local integration
* Add sensor platform
* Enable sensor platform
* Fix manifest
* Correct domain after rename
* Adjust tests for rename
* Correct codeowners
* Add requirements for tests
* Grab coil by name
* Switch to home assistant error
* Config entry always exist
* Switch to create task
* Bump to 0.5.0
* Use new coils access
* Remove unneeded check
* Use single instance of logger
* Test invalid ip
* Don't allow coil to be None
* Remove sleep
* Initialize data in coordinator init
* Add utils to ignore
* Update homeassistant/components/nibe_heatpump/manifest.json
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use generator instead
* Use tenacity as retry decorator
* Use package instead of name to get logger
* Skip broad exception handling
* Catch missing coil exception
* Add missing test
Co-authored-by: J. Nick Koston <nick@koston.org>
* Prompt user to remove application credentials when deleting config entries
* Adjust assertions on intermediate state in config entry tests
* Add a callback hook to modify config entry remove result
* Improve test coverage and simplify implementation
* Register remove callback per domain
* Update homeassistant/components/application_credentials/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix tests to use new variable name including domain
* Add websocket command to return application credentials for an integration
* Remove unnecessary diff
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* deconz - add current hvac operation to thermostate based on "state"
* deconz - extend current hvac operation to thermostate based on "state" and "mode"
* Add tests for current hvac action
* Add boost mode as special case
* format using Black
* sort imports
* Add test for device with mode none and state none
* Update homeassistant/components/deconz/climate.py
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* Fix test_climate.py test_no_mode_no_state
* Add test for boost mode
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* Update integration for a new library
* Update tests
* Add unique_id migration
* Update integration and tests for lib 2.0.0
* Improve test coverage
* Improve typing in tests
* Handle multiple files properly in zwave_js update entity
* Until we have progress, set in progress to true. And fix when we write state
* fix tests
* Assert we set in progress to true before we get progress
* Fix tests
* Comment
* Use dataclass to reference hass.data globals
* Add discovery_registry_hooks to dataclass
* Move discovery registry hooks to dataclass
* Add device triggers to dataclass
* Cleanup DEVICE_TRIGGERS const
* Add last_discovery to data_class
* Simplify typing for class `Subscription`
* Follow up on comment
* Redo suggested typing change to sasisfy mypy
* Restore typing
* Add mypy version to CI check logging
* revert changes to ci.yaml
* Add docstr for protocol
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Mypy update after merging #78399
* Remove mypy ignore
* Correct return type
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Fix update entity startup state
* Only write state if there is a change
* Add test to show that when an existing entity gets recreated, skipped version does not reset
* Remove unused blocks
* Update homeassistant/components/zwave_js/update.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Add infrared brightness select entity for LIFX Night Vision bulbs
Signed-off-by: Avi Miller <me@dje.li>
* Code refactored from review comments
Signed-off-by: Avi Miller <me@dje.li>
* Update and refactor from code review feedback
Signed-off-by: Avi Miller <me@dje.li>
Signed-off-by: Avi Miller <me@dje.li>
* Add SwitchBee Integration
* fixes
* improved API and more logs
* fixed test_config_flow code
* removed light and cover
* Fixed CR comments, updated pylib, improved response time and lowered the scan interval for lower latency
* CR fixes, added advanced setup form to let the
user choose the following:
- scan interval in seconds: default 5
- whether to expose scenarios and group switches from the CU or not
* used SCAN_INTERVAL_SEC instead of typing just the number
* Fixed PR comments, added unit tests
* fixes
* Improved the pypi and updated the code accordingly
* Add SwitchBee Integration
* fixes
* improved API and more logs
* fixed test_config_flow code
* removed light and cover
* Fixed CR comments, updated pylib, improved response time and lowered the scan interval for lower latency
* CR fixes, added advanced setup form to let the
user choose the following:
- scan interval in seconds: default 5
- whether to expose scenarios and group switches from the CU or not
* used SCAN_INTERVAL_SEC instead of typing just the number
* Fixed PR comments, added unit tests
* fixes
* Improved the pypi and updated the code accordingly
* fixes
* restored new line in .coveragerc
* test: increased config_flow test coverage
* removed two way type
* Updated CODEOWNERS
* fix: code review comments
* fixed review comments
* added device_info
* moved device info to attribute
* Test zwave_js update entity progress
* Block until firmware update is done
* Update homeassistant/components/zwave_js/update.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* revert params
* unsub finished event listener
* fix tests
* Add test for returned failure
* refactor a little
* rename
* Remove unnecessary controller logic for mocking
* Clear event when resetting
* Comments
* readability
* Fix test
* Fix test
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add speed info for Leviton 4 speed fans
* Use new format for fan speed configuration
* Add a fixture and test for the Leviton ZW4SF
* Use pytest.approx
* Cleanup discovery on entity removal
* Add test
* Cleanup and test
* Test with clearing payload not unique id
* Address comments
* Tests cover and typing
* Just pass hass
* reuse code
* Follow up comments revert changes to cover tests
* Add test unique_id has priority over disabled
* Update homeassistant/components/mqtt/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Escape media_content_id in media player proxy
* Change usage in kodi
* Change usage in roku
* Change usage in sonos
* Add test
* Add comment
* Change path regex instead of double quoting
* Use .+ instead of .*
* Common tests availability
* Common tests attributes
* Common tests unique id
* Common tests discovery
* Common tests encoding
* Common tests device info
* Common tests entity_id updated
* Common tests entity debug info
* Common test entity category
* Common tests setup reload unload+corrections
* Cleanup sweep
* Comments from curent change
* Cleanup
* Remove unused legacy config
* Improve performance impact of zwave_js update entity and other tweaks
* Reduce concurrent polls
* we need to write state after setting in progress to false
* Fix existing tests
* Fix tests by fixing fixtures
* remove redundant conditional
* Add test for delayed startup
* tweaks
* outdent happy path
* Add missing PROGRESS feature support
* Update homeassistant/components/zwave_js/update.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/update.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix tests by reverting outdent, PR comments, mark callback
* Remove redundant conditional
* make more readable
* Remove unused SCAN_INTERVAL
* Catch FailedZWaveCommand
* Add comment and remove poll unsub on update
* Fix catching error and add test
* readability
* Fix tests
* Add assertions
* rely on built in progress indicator
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>