* replaced MagicMock with CoroutineMock to avoid exception
* added conversion to str so mock returns unique-id that doesn't throw json exception
* added non-empty config since hass throws exception when config is empty
* MQTT Alarm Control Panel to have all available states
* MQTT Alarm Control Panel to have all available states
* test_arm_custom_bypass_* tests added
* MQTT payload_arm_custom_bypass abbreviation
* Add config flow to Synology DSM
* Use proper sensor unique ID from flow + sensor name
* Add description to api_version
* Add authentication flow check
* Add device_info
* Add test_login_failed test
* Bump python-synology to 0.5.0
* 0.5.0 test updates
* Use NAS S/N as config_flow unique_id
* Add missed conf disks + volumes
* Review: async_unload the async_track_time_interval
* Fix NoneType for disks or volumes
* Keep all disks and volumes forever
* Update homeassistant/components/synology_dsm/.translations/en.json
Co-Authored-By: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/synology_dsm/strings.json
Co-Authored-By: J. Nick Koston <nick@koston.org>
* Fix "Keep all disks and volumes forever" for empty import
* Fix prettier
* Remove useless LOGGER in config flow
* Fix Synology DSM tests doing I/O
Co-authored-by: J. Nick Koston <nick@koston.org>
Home Assistant auto mode is described as
"The device is set to a schedule, learned behavior, AI."
HomeKit Accessory Protocol expects "heating or cooling to maintain
temperature within the heating and cooling threshold of the
target temperature"
Since HomeKit is expecting to set temperatures in this mode,
mapping homekit state 3 ("Auto") to Home Assistant HVAC_MODE_HEAT_COOL
is more inline with how Home Assistant defines HVAC_MODE_HEAT_COOL
as "The device supports heating/cooling to a range"
* Add prettier (in pre-commit and CI)
* Make all file prettier
* Change order
* Add to Azure Pipelines
* Fix a YAML file prettier caught as invalid
* Remove flow mapping using curly braces from all YAML service files
Homekit only has Off/Heat/Cool/Auto at this time, but
at least we can prevent the device from erroring
by mapping dry and fan to cool so it continues
to function.
* Add yamllint (in pre-commit and CI)
* Fix linting for all YAML files
* Bump and add it to requirements
* Fix gen_requirements for pre-commit, remove 'v' from version
* Small code style improvements to Insteon integration
* Update homeassistant/components/insteon/utils.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Handle race condition in harmony setup
If the remote was discovered via ssdp before the yaml config import
happened, the unique id would already be set and the import
would abort.
* Update homeassistant/components/harmony/config_flow.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* reduce
* black
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Debounce calls to Plex server
* Simplify debounce by recommendation
* Update tests to handle debounce
* Test debouncer, fix & optimize tests
* Use property instead
* Add available property and raise exception
* Add entity available property
* Refactoring and fixes
* Refactoring and fix for multi sensor
* Bump abodepy version
Integration configuration cannot complete as it is currently looking for /states after authentication. Replacing with /lovelace to allow the script to complete after successful authentication with Automatic.
* Adding support for Mi AirPurifier 3
* Adding support for Mi AirPurifier 3H
* Enabled setting fan level for AirPurifier 3/3H
* Get rid of isinstance for MIOT AirPurifier
* Bumping xiaomi-miio dependency
* Fixed lint error
* Update manifest.json
* Fixed requirements files for 0.5.0.1
Co-authored-by: Piotr Król <Piotr@gorszyportal.pl>
* Adding vera config entries support.
* Fixing lint error.
* Applying minimal changes necessary to get config entries working.
* Addressing PR feedback by further reducing the scope of the change.
* Addressing PR feedback.
* Fixing pyvera import to make it easier to patch.
Addressing PR feedback regarding creation of controller and scheduling of async config flow actions.
* Updating code owners file.
* Small fixes.
* Adding a user config flow step.
* Adding optional configs for user config flow.
* Updating strings to be more clear to the user.
* Adding options flow.
Fixing some PR feedback.
* Better handling of options.
PR feedback changes.
* Using config registry to update config options.
* Better managing config from file or config from UI
Disabling config through UI if config is provided from a file.
More tests to account for these adjustments.
* Address PR feedback.
* Fixing test, merging with master.
* Disabling all Vera UI for configs managed by configuration.yml.
Adding more tests.
* Updating config based on unique_id.
Addressing additional PR feedback.
* Rebasing off dev.
Addressing feedback.
* Addressing PR feedback.
* force_update added
As per this discussion we need to update last_changed when active timer restarted.
One way to do that is to force HA update the state on each request even if it remains the same.
More details here - https://github.com/home-assistant/architecture/issues/345
* add test for force_update
make sure state_change event fired every time timer (re)started
* remove whitespaces
* remove whitespace
* Update tests/components/timer/test_init.py
Co-Authored-By: Alexei Chetroi <lexoid@gmail.com>
* fix lint
* fix isort
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
When placeholders are in use, flow_title needs to be
set in the json to prevent an empty name in the
integrations dashboard. This affected doorbirds
that were found via ssdp.
* Async fix
* Update homeassistant/components/rachio/switch.py
Co-Authored-By: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/rachio/switch.py
Co-Authored-By: J. Nick Koston <nick@koston.org>
* Fix format
* Remove from hass
* undo dispatcher
Co-authored-by: J. Nick Koston <nick@koston.org>
* add sound mode support for devices that support it
* make setting and unsetting flag better
* move eq and audio settings into constants
* fix missed statement to use constant instead of hardcoded string
* further fixes based on review
* bump pyvizio version to include newly identified app
* Switch homekit lights to use service callbacks
Service callbacks allow us to get the on/off, brightness, etc
all in one call so we remove all the complexity that was
previously needed to handle the out of sync states
We now get the on event and brightness event at the same time
which allows us to prevent lights from flashing up to 100%
before the requested brightness.
* Fix STATE_OFF -> STATE_ON,brightness:0
* Use backend-provided fan speed presets for Xiaomi vacuums
This needs input from Xiaomi vacuum owners to verify that it does not break anything.
I have personally tested this on rockrobo v1 (old mapping).
Related issues/PRs:
home-assistant/core#32821home-assistant/core#31268home-assistant/core#27268
This is a WIP as it requires a new upstream release.
The PR is https://github.com/rytilahti/python-miio/pull/643
* Bump version requirement for 0.5.0
* Bump requirements_test_all.txt, too
* Fix linting; missing setup.cfg on local checkout caused wrong settings for black..
* Add tests for both fan speed types
* Remove useless else..
* bump python-miio to 0.5.0.1 due to broken 0.5.0 packaging
* Support for returning NULL in color or temperature. Fixes#33469
* Added further support for ‘None’ returns in level template
* Removed assumption that template render may not be a string
* Streamlined code per cloud pylint
* Updates per code review suggestions
* Added improved error handling and logging for brightness
* Additional exception handling for temperature
* Add melcloud AtaDevice vane control
* Return empty dict when no vane states available
Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>
* Use constants for services and conf
* Split state attribute assignment and fix suggested changes
* Log valid positions when called with an invalid position
* Improve service description
Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
* lib version
* unit-test refactoring
* added type hints
* added cover
* added test to see that consts have the same value as library consts
* Update tests/components/dynalite/test_init.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* removed trigger template
* Update homeassistant/components/dynalite/__init__.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/dynalite/const.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* removed CONF_TRIGGER from const
corrected type hints - not clear why mypy didn't catch it
* conversion of the config to library CONFs
* moved to use the value since it should come from the library
* taking CONF_HOST from homeassistant.const instead of module const
* use dict.get
removed leftover log
* force device_class to be from homeassistant consts
* move dict.get to inline
* removed CONF from values
changed "channelcover" to "channel_cover"
* moved some CONF values out of const.py and taking them from homeassistant.const
* verifying that device class is a valid HA device class
* moved shutter to home assistant const
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Don't write storage to disk while stopping
* rework change
* lint
* remove delay save and schedule final write at stop
* update tests
* fix test component using private methods
* cleanup
* always listen
* use stop in restore state again
* whitelist JSON exceptions for later
* review comment
* make zwave tests use mock storage
If the harmony hub was not ready for connection or
was busy when importing from yaml, the import validation
would fail would not be retried.
To mitigate this scenario we now do the validation in
async_setup_platform which allows us to raise
PlatformNotReady so we can retry later.
* Handle unavailabe entities
* Remove some logging
* Set valve to lowest temp when turned off
* Remove some logging
* Address comments
* Report entity as connected if update is successful
* Fix stupidness
* Fix
* Store device_registry entry id in HueEvent
so it can be retrieved with that key when using device triggers
* Add device_trigger for hue_event from hue remotes
* supporting Hue dimmer switch & Hue Tap
* State mapping and strings are copied from deCONZ
* refactor mock_bridge for hue tests
and also share `setup_bridge_for_sensors`
for test_sensor_base and test_device_trigger.
* Add tests for device triggers with hue remotes
* Remove some triggers
* replace asyncio.wait with asyncio.gather since wait ignores exceptions
fix for test_entity_platform so it expects the exception
* changed to log on failed domains
* discovered that this fix actually removes other uncaught exceptions
* fix in the list of ignored exceptions
* replaced a few ignores on dyson tests that work locally but fail in the CI
* two more tests that are failing on the CI and not locally
* removed assertion on multiple entries with same unique_id - replaced with log and return
reverted test_entity_platform to its original since now there is no exception thrown
* entered all the dyson tests. they all pass locally and probabilistically fail in the CI
* removed unnecessary str() for exception
* added log message for duplicate entity_id / unique_id
* removed log in case of False return value
* added exc_info
* change the use of exc_info
* Convert nut to config flow
* Add a test for importing
* lint
* Address review items (part 1)
* Address review items (part 1)
* Cleanup unique id handling
* Update tests for new naming scheme
* No unique id, no device_info
* Remove sensor types
* Update tests to use resources that still exist
* Fix setting zone overlays for tados that support swing
* Support for changing swing mode will come at a later
time as another upstream update is required.
* remove debug
* style
* The api reports success before the state change
takes effect
* We now set state optimistically and followup with
an update 4 seconds in the future after any state change to
verify it actually happens.
* When hvac_mode is passed to the set_temperature service
we now switch to the desired mode.
* Add remote platform to hue integration
supporting ZGPSwitch, ZLLSwitch and ZLLRotary switches.
* Ported from custom component Hue-remotes-HASS from @robmarkcole
* Add options flow for hue, to toggle handling of sensors and remotes
* Sensors are enabled by default, and remotes are disabled,
to not generate any breaking change for existent users.
Also, when linking a new bridge these defaults are used,
so unless going explicitly to the Options menu,
the old behavior is preserved.
* SensorManager stores the enabled platforms and ignores everything else.
* Bridge is created with flags for `add_sensors` and `add_remotes`,
and uses them to forward entry setup to only the enabled platforms.
* Update listener removes disabled kinds of devices when options are changed,
so device list is in sync with options, and disabled kinds disappear from HA,
leaving the enable/disable entity option for individual devices.
* Fix hue bridge mock with new parameters
* Revert changes in hue bridge mock
* Remove OptionsFlow and platform flags
* Extract `GenericHueDevice` from `GenericHueSensor`
to use it as base class for all hue devices, including those without any entity,
like remotes without battery.
* Add `HueBattery` sensor for battery powered remotes
and generate entities for TYPE_ZLL_ROTARY and TYPE_ZLL_SWITCH remotes.
* Remove remote platform
* Add HueEvent class to fire events for button presses
* Use `sensor.lastupdated` string to control state changes
* Event data includes:
- "id", as pretty name of the remote
- "unique_id" of the remote device
- "event", with the raw code of the pressed button
('buttonevent' or 'rotaryevent' property)
- "last_updated", with the bridge timestamp for the button press
* Register ZGP_SWITCH, ZLL_SWITCH, ZLL_ROTARY remotes
* fix removal
* Exclude W0611
* Extract GenericHueDevice to its own module
and solve import tree, also fixing lint in CI
* Store registered events to do not repeat device reg
* Minor cleaning
* Add tests for hue_event and battery entities for hue remotes
* Best effort state initialization of bayesian binary sensor.
Why:
* https://github.com/home-assistant/home-assistant/issues/30119
This change addresses the need by:
* Running the main update logic eagerly for each entity being observed
on `async_added_to_hass`.
* Test of the new behavior.
* Refactor in order to reduce number of methods with side effects that
mutate instance attributes.
* Improve test coverage
Why:
* Because for some reason my commits decreased test coverage.
This change addresses the need by:
* Adding coverage for the case where a device returns `STATE_UNKNOWN`
* Adding coverage for configurations with templates
* rebase and ensure upstream tests passed
* Delete commented code from addressing merge conflict.
* Add HomeKit support for slat tilting
* Reset tilt-specific attribute, not position attribute
Co-Authored-By: J. Nick Koston <nick@koston.org>
* Add explanation why we fix HomeKit's targets
We have to assume that the device has worse precision than HomeKit. If it
reports back a state that is only _close_ to HK's requested state, we'll
"fix" what HomeKit requested so that it won't appear out of sync.
Co-authored-by: J. Nick Koston <nick@koston.org>
* Create __init__.py
* Create manifest.json
* Update zeroconf.py
* more work on integration
* more work on integration.
* add more sensor tests.
* Update const.py
* Update sensor.py
* more work on ipp.
* Update test_config_flow.py
* more work on ipp.
* Update config_flow.py
* Update config_flow.py
* Update Meteo_France Weather constants
Updating Meteo_France integration with more weather "condition" returned by the web service.
Adding:
- "Nuit claire" (note the lower 'c') mapped to "clear-night"
- "Brume" mapped to "fog"
* Black formatting update
* add services for DSP
* add homeassistant/components/kef/const.py
* add services.yaml
* fix set_mode
* fix services
* media_player.py fixes
* bump aiokef to 0.2.9
* update requirements_all.txt
* add basic sensor.py
* add DSP settings as attributes
* add message about kef.update_dsp
* remove sensor.py
* fix pylint issues
* update_dsp inside async_added_to_hass
* use {...} instead of dict(...)
* get DSP settings when connecting to HA or once on update
* simplify condition
* do not get mode twice
* remove async_added_to_hass
* use async_register_entity_service
* remove entity_id from schema and prepend _value
* invalidate self._dsp after setting a DSP setting
* schedule update_dsp every hour
* subscribe and unsubscribe on adding and removing to HA
* don't pass hass and set _update_dsp_task_remover to None after removing
* add third stage to hass shutdown
* use 3rd stage in storage
* update core state
* add writing data to multi stop ignore
* update core test
* review comment
* update name based on feedback
* Add include_location_attributes
* Add check for different state
* Fix things
* Drop filter
* significant changes only
* Change default behavior
* Remove trailing commas
* Tado climate state moved to python-tado
* Resolve various incorrect states and add tests for known tado zone states
* Write state instead of calling for an update
This is a redux of pr #32564 with all of the zone state now moved into
python-tado and tests added for the various states.
* stale string
* add missing undos to dispachers
* remove unneeded hass
* naming
* rearrange
* fix water heater, add test
* fix water heater, add test
* switch hvac mode when changing temp if in auto/off/smart
* add test to for importing multiple output settings
* provide option to set multiple output states
* tweaks after testing
* Update homeassistant/components/konnected/config_flow.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Prevent nut from doing I/O in the event loop
device_state_attributes would call for an update if the
throttle happened to expire.
* _format_display_state no self use
* Modbus: remove legacy code
flexit and stiebel_el are updated to import modbus.const,
therefore legacy code can be removed.
* Flexit: update const reference from modbus
climate.py imports from modbus direct, this is legacy and will
result in errors.
update import to be modbus.const.
* Stiebel_el: update reference to modbus
__init.py references modbus directly, this is legacy and will
give errors.
Update import to be modbus.const.
* Use new labels for HomematicIP Cloud multi devices
* Update homeassistant/components/homematicip_cloud/device.py
Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>
* Update name composition
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>