* 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
* 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>
* 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>
* modbus: bumb pymodbus version to 2.3.0
pymodbus version 1.5.2 did not support asyncio, and in general
the async handling have been improved a lot in version 2.3.0.
updated core/requirement*txt
* updated core/CODEOWNERS
committing result of 'python3 -m script.hassfest'.
* modbus: change core connection to async
change setup() --> async_setup and update() --> async_update()
Use async_setup_platform() to complete the async connection to core.
listen for EVENT_HOMEASSISTANT_START happens in async_setup()
so it needs to be async_listen.
But listen for EVENT_HOMEASSISTANT_STOP happens in start_modbus()
which is a sync. function so it continues to be listen().
* modbus: move setup of pymodbus into modbushub
setup of pymodbus is logically connected to the class modbushub,
therefore move it into the class.
Delay construction of pymodbus client until event
EVENT_HOMEASSISTANT_START arrives.
* modbus: use pymodbus async library
convert pymodbus calls to refer to the async library.
Remark: connect() is no longer needed, it is done when constructing
the client. There are also automatic reconnect.
* modbus: use async update for read/write
Use async functions for read/write from pymodbus.
change thread.Lock() to asyncio.Lock()
* Modbus: patch for slow tcp equipment
When connecting, via Modbus-TCP, so some equipment (like the
huawei sun2000 inverter), they need time to prepare the protocol.
Solution is to add a asyncio.sleep(x) after the connect() and before
sending the first message.
Add optional parameter "delay" to Modbus configuration.
Default is 0, which means do not execute asyncio.sleep().
* Modbus: silence pylint false positive
pylint does not accept that a class construction __new__
can return a tuple.
* Modbus: move constants to const.py
Create const.py with constants only used in
the modbus integration.
Duplicate entries are removed, but NOT any entry that would
lead to a configuration change.
Some entries were the same but with different names, in this
case renaming is done.
Also correct the tests.
* Modbus: move connection error handling to ModbusHub
Connection error handling depends on the hub, not the
entity, therefore it is logical to have the handling in
ModbusHub.
All pymodbus call are added to 2 generic functions (read/write)
in order not to duplicate the error handling code.
Added property "available" to signal if the hub is connected.
* Modbus: CI cleanup
Solve CI problems.
* Modbus: remove close of client
close() no longer exist in the pymodbus library, use
del client instead.
* Modbus: correct review comments
Adjust code based on review comments.
* Modbus: remove twister dependency
Pymodbus in asyncio mode do not use twister but still throws a
warning if twister is not installed, this warning goes into
homeassistant.log and can thus cause confusion among users.
However installing twister just to avoid the warning is not
the best solution, therefore removing dependency on twister.
* Modbus: review, remove comments.
remove commented out code.
* Implement Alexa.CameraStreamController.
* Add dependencies.
* Add camera helpers for image url, and mjpeg url.
* Remove unsupported AlexaPowerController from cameras.
* Refactor camera_stream_url to hass_url
* Declare HLS instead of RTSP.
* Add test for async_get_image_url() and async_get_mpeg_stream_url().
* Sort imports.
* Fix camera.options to camera.stream_options. (#32767)
(cherry picked from commit 9af95e8577)
* Remove URL configuration option for AlexaCameraStreamController.
* Update test_initialize_camera_stream.
* Optimize camera stream configuration.
* Update Tests for optimized camera stream configuration.
* Sort imports.
* Add check for Stream integration.
* Checks and Balances.
* Remove unnecessary camera helpers.
* Return None instead of empty list for camera_stream_configurations().
In PR#24804 the step size was changed to match the step size
of the device that HomeKit is controlling. Since HomeKit
is always working in TEMP_CELSIUS and the step size is based on
the Home Assistant units setting, we were mixing data with different
units of measure when Home Assistant was using imperial units.
This regression presented the symptom that setting the
temperature to 73F would result in 74F. Other values are affected
where the math doesn't happen to work out.
HomeKit currently has a default of 0.1 in the spec and the override
of this value has been removed.
* Config flow for elkm1
* As entity ids can now be changed, the “alarm_control_panel”
attribute “changed_by_entity_id” is now “changed_by_keypad”
and will show the name of the Elk keypad instead of the entity id.
* An auto configure mode has been introduced which avoids the
need to setup the complex include and exclude filters. This
functionality still exists when configuring from yaml for power
users who want more control over which entities elkm1 generates.
* restore _has_all_unique_prefixes
* preserve legacy behavior of creating alarm_control_panels that have no linked keypads when auto_configure is False
* unroll loop
* start of fan groups
* update fan classes
* update group entity domains
* add set speed
* update discovery for multiple entities for groups
* add fan group entity tests
* cleanup const
* cleanup entity_domain usage
* remove bad super call
* remove bad update line
* fix set speed on fan group
* change comparison
* pythonic list
* discovery guards
* Update homeassistant/components/zha/core/discovery.py
Co-Authored-By: Alexei Chetroi <lexoid@gmail.com>
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
* Abort rachio homekit config when one is already setup.
We can see rachio on the network to tell them to configure
it, but since the device will not give up the account it is
bound to and there can be multiple rachio controllers on a single
account, we avoid showing the device as discovered once
they already have one configured as they can always
add a new one via "+"
* doc string freshness
* doc string freshness
* Update tests/components/rachio/test_config_flow.py
Co-Authored-By: Franck Nijhof <git@frenck.dev>
Co-authored-by: Franck Nijhof <git@frenck.dev>
* bump pyvizio and update app_id to show app config to aid in HA config generation. squashed from multiple commits to make a rebase on dev easier
* bump pyvizio for bug fixes
* fix pyvizio version number
* only return app_id if app is unknown and explicitly create the dict that's returned
* fix tests
* fix docstring for app_id
* split entity into base and entity
* add initial light group support
* add dispatching of groups to light
* added zha group object
* add group event listener
* add and remove group members
* get group by name
* fix rebase
* fix rebase
* use group_id for unique_id
* get entities from registry
* use group name
* update entity domain
* update zha storage to handle groups
* dispatch group entities
* update light group
* fix group remove and dispatch light group entities
* allow picking the domain for group entities
* beginning - auto determine entity domain
* move methods to helpers so they can be shared
* fix rebase
* remove double init groups... again
* cleanup startup
* use asyncio create task
* group entity discovery
* add logging and fix group name
* add logging and update group after probe if needed
* test add group via gateway
* add method to get group entity ids
* update storage
* test get group by name
* update storage on remove
* test group with single member
* add light group tests
* test some light group logic
* type hints
* fix tests and cleanup
* revert init changes except for create task
* remove group entity domain changing for now
* add missing import
* tricky code saving
* review comments
* clean up class defs
* cleanup
* fix rebase because I cant read
* make pylint happy
We can see myq on the network to tell them to configure
it, but since the device will not give up the account it is
bound to and there can be multiple myq gateways on a single
account, we avoid showing the device as discovered once
they already have one configured as they can always
add a new one via "+"
* Added support for Minecraft SRV records
* Switched from dnspython to aiodns, improved server ping and log messages, use address instead of host and port in config flow
* Updated component requirements
* Fix state_automation_listener when new state is None (fix#32984)
* Listen to EVENT_STATE_CHANGED instead of using async_track_state_change
and use the event context on automation trigger.
* Share `process_state_match` with helpers/event
* Add test for state change automation on entity removal
* Use async_call_later for retrying, instead of async_track_point_in_time
* Normalize test filename renaming it to `test_sensor`
* Remove link to docs in docstring
* Adjust test results to new behavior with async_call_later
* Update firmware version in device registry.
Parse recevied OTA requests for firmware version and update device
registry.
* Update tests.
* Cleanup sw_id_update listener.
* Update ZHA test devices list.
* Add aircleaner and humidify service to nexia climate
* These were removed from the original merge to reduce review scope
* Additional tests for binary_sensor, sensor, and climate states
* Switch to signals for services
Get rid of everywhere we call device and change to zone or thermostat
as it was too confusing
Renames to make it clear that zone and thermostat are tightly coupled
* Make scene activation responsive
* no need to use update for only one key/value
* stray comma
* use async_call_later
* its async, need ()s
* cleaner
* merge entity platform services testing branch
* Config flow for doorbird
* Discoverable via zeroconf
* Fix zeroconf test
* add missing return
* Add a test for legacy over ride url (will go away when refactored to cloud hooks)
* Update homeassistant/components/doorbird/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* without getting the hooks its not so useful
* Update homeassistant/components/doorbird/config_flow.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* fix copy pasta
* remove identifiers since its in connections
* self review fixes
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Modernize nuheat for new climate platform
* Home Assistant state now mirrors the
state displayed at mynewheat.com
* Remove off mode as the device does not implement
and setting was not implemented anyways
* Implement missing set_hvac_mode for nuheat
* Now shows as unavailable when offline
* Add a unique id (serial number)
* Fix hvac_mode as it was really implementing hvac_action
* Presets now map to the open api spec
published at https://api.mynuheat.com/swagger/
* ThermostatModel: scheduleMode
* Revert test cleanup as it leaves files behind.
Its going to be more invasive to modernize the tests so
it will have to come in a new pr
* Config flow for nuheat
* codeowners
* Add an import test as well
* remove debug
If the IP address of the harmony hub changed it would
not be rediscovered. We now connect to get the
unique id and then update config entries with
the correct ip if it is already setup.
* Add new integration: pvpc_hourly_pricing
to add a sensor with the current hourly price of electricity in Spain.
Configuration is done by selecting one of the 3 reference tariffs, with
1, 2, or 3 billing periods.
* Features config flow, entity registry, RestoreEntity, options flow
to change tariff, manual yaml config as integration or sensor platform
* Cloud polling sensor with minimal API calls (3/hour at random times)
and smart retry; fully async
* Only 1 state change / hour (only when the price changes)
* At evening, try to download published tomorrow prices, to always store
prices info for a window of [3, 27] hours in the future.
* Include useful state attributes to program automations to be run
at best electric prices.
* Add spanish and english translations.
* Requires `xmltodict` to parse official xml file with hourly prices
for each day.
* Update requirements and add to codeowners
* Avoid passing in hass as a parameter to the entity
Instead, create time change listeners in async_added_to_hass and
call async_generate_entity_id before async_add_entities
* Fix lint issues
* Add tests for config & options flow
* Add tests for manual yaml config
with entity definition as integration and also as a sensor platform
* Fix placement of PLATFORM_SCHEMA and update generated config_flows
* Store prices internally linked to UTC timestamps
- to deal with days with DST changes
- and work with different local timezones
* Add availability to sensor
to 'expire' the sensor if there is no connection available
and current hour is not in the stored prices.
Also, turn off logging and retrying if prices can't be downloaded
repeatedly, by flagging `data_source_available` as False, so there is no
log-flood mess.
* Add more tests
- to cover behavior in DST changes and complete coverage of sensor logic
- to cover abort config flow
* fix linter
* Better handling of sensor availability and minor enhancements
- Emmit 1 error if data source is marked as unavailable
(after some retries), and be silent until cloud access is recovered,
then emmit 1 warning.
- Follow standard of camel_case keys in attributes
* Mock aiosession to not access real API, store fixture data
- Store a set of daily xml files to test sensor logic for all situations
- Mock time and session to run tests with stored API responses
- Add availability test to simulate a lost + recovery of cloud access,
checking that logging is reasonable: 1 error to flag the continued
disconnection + 1 warning in recovery.
* Change API endpoint to retrieve JSON data
and remove xmltodict from reqs.
It seems that this endpoint is more reliable than the XML.
* Adapt tests to new API endpoint
* Translate tariff labels to plain English
and sync the default timeout value for all ways of configuration.
* Relax logging levels to meet silver requirements
- 1 warning when becoming unavailable, another warning when recovered.
- Warnings for unexpected TimeoutError or ClientError
- Move the rest to debug level, leaving info for HA internals
Also reduce number of API calls from 3 to 2 calls/hour.
* Fix requirements
* Mod tests to work with timezone Atlantic/Canary
and fix state attributes for timezones != reference, by using 3 price
prefixes: 'price_last_day_XXh', 'price_next_day_XXh' and 'price_XXh',
all generated with local time (backend timezone)
* Try to fix CI tests
* Externalize pvpc data and simplify sensor.py
* add new `aiopvpc` to requirements
* Remove data parsing and price logic from here
* Replace some constant properties with class variables
* Simplify tests for pvpc_hourly_pricing
* Fix updater for options flow
* Updater always reloads
* `tariff` value comes 1st from entry.options, 2nd from entry.data
* Fix lint
* Bump aiopvpc
* Remove options flow and platform setup
- Remove PLATFORM_SCHEMA and async_setup_platform
- Generate config_entry.unique_id with tariff instead of entity_id, in flow step.
- Remove TariffSelectorConfigFlow
- Adapt tests to maintain full coverage
* Fix docstring on test
and rename SENSOR_SCHEMA to SINGLE_SENSOR_SCHEMA to avoid confusion
* Remove timeout manual config, fix entry.options usage, simplify unique_id
* Simplify tests
- No need for a test_setup now, as platform setup is removed and integration
setup is already used in `test_availability`
- Simplified `_process_time_step`: only one async_fire(EVENT_TIME_CHANGED)/hour
* Fix possible duplicated update
when source is not available.
* Do not access State last_changed for log messages
* Do not update until entity is added to hass
and call to async_update after 1st download or when recovering access, so
async_write_ha_state is not called twice on those.
* minor changes
* Rename method to select current price and make it a callback
* filter out additional app config names from pyvizios app list
* add test
* change where filtering app list occurs
* fix test
* fix mistake in change
* hopefully final test fix
* fix test scenario that unknowingly broke with test change
* Validate UUIDs against custom validator
Instead of just validating against strings, use a custom validator,
so that the format can be checked.
* Add tests for custom UUID4 validator
* Add support for nexia automations
Bump nexia to 0.7.1
Start adding tests
Fix some of the climate attributes that were wrong (discovered while adding tests)
Pass the name of the instance so the nexia UI does not display "My Mobile"
* fix mocking
* faster asserts, scene
* scene makes so much more sense
* pylint
* Update homeassistant/components/nexia/scene.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* docstring cleanup
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add a config flow for myq
* Discovered by homekit
* Fix gates being treated as garage doors
* Offline devices now show as unavailable
* Homekit flow
* strip out icon
* return -> raise
* Modernize nuheat for new climate platform
* Home Assistant state now mirrors the
state displayed at mynewheat.com
* Remove off mode as the device does not implement
and setting was not implemented anyways
* Implement missing set_hvac_mode for nuheat
* Now shows as unavailable when offline
* Add a unique id (serial number)
* Fix hvac_mode as it was really implementing hvac_action
* Presets now map to the open api spec
published at https://api.mynuheat.com/swagger/
* ThermostatModel: scheduleMode
* Empty commit to re-run ci
* Revert test cleanup as it leaves files behind.
Its going to be more invasive to modernize the tests so
it will have to come in a new pr
* Wait for cloud connection
* Just wait
* Remove redundant entry
* Drop webhook before unloading other platforms
* Add missing scope
* Update homeassistant/components/netatmo/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Fix test
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Add tests for states of the sensors
* Revert async_update method
* Tests improvement
* Fix icon name
* Tests improvement
* Simplify tests
* Test improvement
* Patch the library instead of the coordinator
* Suggested change
* Remove return_value
* Update powerwall unique id
* Fix somfy optimistic mode when missing in conf (#32995)
* Fix optimistic mode when missing in conf #32971
* Ease code using a default value
* Client id and secret are now inclusive
* Bump aiohomekit to fix Insignia NS-CH1XGO8 and Lennox S30 (#33014)
* Axis - Fix char in stream url (#33004)
* An unwanted character had found its way into a stream string, reverting f-string work to remove duplication of code and improve readability
* Fix failing tests
* deCONZ - Add support for Senic and Gira Friends of Hue remote… (#33022)
* Update the test
* Harmony config flow improvements (#33018)
* Harmony config flow improvements
* Address followup review comments from #32919
* pylint -- catching my naming error
* remove leftovers from refactor
* Update powerwall unique id
* Update the test
Co-authored-by: tetienne <thibaut@etienne.pw>
Co-authored-by: Jc2k <john.carr@unrouted.co.uk>
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* Merge nexia
* Restore original work
* Merge cleanups
* config flow
* Add config flow
* Add missing files
* Fix import of old yaml config
* More cleanups from self review
* Additional self review
* Update homeassistant/components/nexia/services.yaml
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* fix io in event loop
* Update homeassistant/components/nexia/climate.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* avoid using ternary statements if they span multiple
* Cleanup strings and remove unneeded attributes
* more cleanup
* more cleanup of yaml
* remove coordinator boiler plate
* nuke services for now for the inital pr, add back later
* remove copy pasta
* this can be reduced more
* Update homeassistant/components/nexia/config_flow.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/nexia/config_flow.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/nexia/__init__.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/nexia/__init__.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/nexia/__init__.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/nexia/__init__.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* review
* comments
* Update homeassistant/components/nexia/climate.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/nexia/climate.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/nexia/climate.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* more review adjustments
* nuke unused constants
* Update homeassistant/components/nexia/config_flow.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* map states
* add update
* zone id is unique
* Fix humidfy check
* target_humidity should be a property instead of in attributes
* remove aux heat as its already there
Co-authored-by: Ryan Nazaretian <ryannazaretian@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Config flow for harmony
* Fixes unique ids when using XMPP
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
* Find the unique id for the config flow
* move shutdown to init
* Add test for ssdp (still failing)
* Fix ssdp test
* Add harmony to MIGRATED_SERVICE_HANDLERS (this is a breaking change)
* more cleanups
* use unique id for the config file
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
* here_travel_time: Add modes arrival and departure
* convert arrival/departure from datetime to time
* Default departure is set by external lib on None
* Use cv.key_value_schemas
* Initial commit
* Restricting conditions by supported_features, drop pending condition
* Added tests for no and minimum amount of conditions
* Address review comments
* Sort impors with isort
* Sort impors with isort v2
* Add tests for several devices
* Update coveragerc
* Code review changes and minor clean up
* More code review changes
* Update manifest and minor test updates
* Add test for locks and covers
* Add tests for switch on and off
* Add more complete test for alarms
* Fix for camera test
* Patch abodepy.mode for tests
* Add test for unknown alarm state and minor cleanup
* Update to make tests more robust
* More specific tests
* Update quality scale to silver
* Remove integration quality scale
* Require a hyphen in lovelace dashboard url
* Keep storage dashboards working
* register during startup again
* Update homeassistant/components/lovelace/dashboard.py
Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>
* Comments
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Do not fail when a user has a controller with shared access on their account
* Add config flow for rachio
Also discoverable via homekit
* Update homeassistant/components/rachio/switch.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Split setting the default run time to an options flow
Ensue the run time coming from yaml gets imported into the option flow
Only get the schedule once at setup instead of each zone (was hitting rate limits)
Add the config entry id to the end of the webhook so there is a unique hook per config entry
Breakout the slew of exceptions rachiopy can throw into RachioAPIExceptions
Remove the base url override as an option for the config flow
Switch identifer for device_info to serial number
Add connections to device_info (mac address)
* rename to make pylint happy
* Fix import of custom_url
* claim rachio
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* emulated_hue: Optimize is_entity_exposed
Switch all list transversals in is_entity_exposed to
hash lookups
get_deprecated is now only called if explict_expose is
set
This funciton was iterating multiple lists per enitity
every time there was an update. It was responsible for
a chunk of execution time when there are large number
of entities in home assistant.
* Complete deprecation of ATTR_EMULATED_HUE attribute
* Complete deprecation of ATTR_EMULATED_HUE attribute (remove const)
* Remove ATTR_EMULATED_HUE_HIDDEN and Rewrite tests
* move apps configuration to options flow
* add additional assertion to new test
* add additional assertions for options update
* update docstrings, config validation, and tests based on review
* Add limit parameter to service call methods
* Break out prep part of async_call_from_config for use elsewhere
* Minor cleanup
* Fix improper use of asyncio.wait
* Fix state update
Call change listener immediately if its a callback
* Fix exception handling and logging
* Merge Script helper if_running/run_mode parameters into script_mode
- Remove background/blocking _ScriptRun subclasses which are no longer needed.
* Add queued script mode
* Disable timeout when making fully blocking script call
* Don't call change listener when restarting script
This makes restart mode behavior consistent with parallel & queue modes.
* Changes per review
- Call all script services (except script.turn_off) with no time limit.
- Fix handling of lock in _QueuedScriptRun and add comments to make it
clearer how this code works.
* Changes per review 2
- Move cancel shielding "up" from _ScriptRun.async_run to Script.async_run
(and apply to new style scripts only.) This makes sure Script class also
properly handles cancellation which it wasn't doing before.
- In _ScriptRun._async_call_service_step, instead of using script.turn_off
service, just cancel service call and let it handle the cancellation
accordingly.
* Fix bugs
- Add missing call to change listener in Script.async_run
in cancelled path.
- Cancel service task if ServiceRegistry.async_call cancelled.
* Revert last changes to ServiceRegistry.async_call
* Minor Script helper fixes & test improvements
- Don't log asyncio.CancelledError exceptions.
- Make change_listener a public attribute.
- Test overhaul
- Parametrize tests.
- Use common test functions.
- Mock timeout so tests don't need to wait for real time to elapse.
- Add common function for waiting for script action step.