* 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.
* Add config flow to Freebox
* Add manufacturer in device_tracker info
* Add device_info to sensor + switch
* Add device_info: connections
* Add config_flow test + update .coveragerc
* Typing
* Add device_type icon
* Remove one error log
* Fix pylint
* Add myself as CODEOWNER
* Handle sync in one place
* Separate the Freebox[Router/Device/Sensor] from __init__.py
* Add link step to config flow
* Make temperature sensors auto-discovered
* Use device activity instead of reachablility for device_tracker
* Store token file in .storage
Depending on host if list of Freebox integration on the future without breaking change
* Remove IP sensors + add Freebox router as a device with attrs : IPs, conection type, uptime, version & serial
* Add sensor should_poll=False
* Test typing
* Handle devices with no name
* None is the default for data
* Fix comment
* Use config_entry.unique_id
* Add async_unload_entry with asyncio
* Add and use bunch of data size and rate related constants (#31781)
* Review
* Remove useless "already_configured" error string
* Review : merge 2 device & 2 sensor classes
* Entities from platforms
* Fix unload + add device after setup + clean loggers
* async_add_entities True
* Review
* Use pathlib + refactor get_api
* device_tracker set + tests with CoroutineMock()
* Removing active & reachable from tracker attrs
* Review
* Fix pipeline
* typing
* typing
* typing
* Raise ConfigEntryNotReady when HttpRequestError at setup
* Review
* Multiple Freebox s
* Review: store sensors in router
* Freebox: a sensor story
* cleanup timer handle when device is removed
* separate unavailable times for mains vs battery
* better name
* remove light refresh handle when removing light
* remove unused parallel updates
* don't steal HA const for different purpose
* don't flood network every hour for lights
* update test to test both intervals
* add test for light refresh interval
* fix tests
* update test
* put parallel updates back for now...
* fix async_schedule_update_ha_state usage
* review comment
* review comment
* update test - review conversation
* review comments
* await count not call count
* flip some state
* adkj
* reduce
* Convert august to async
Async io was added to py-august 0.24
* Fix lint
* Lock operation sensors for august
* Tracking lock operation method allows user presence detection at the lock
* revert lock changes
* fix activity count merge conflict reversion
* Fix revert that come back with the conflict
* input_datetime guard for unexpected state
If state is a time and has_date = true, or the other way around, restore state would error
* Update __init__.py
* Add test
* Add griddy integration
* Griddy is a wholesale power provider in Texas
* Supports all four load zones in Texas
* Provides real time power price which is useful for automations to handle demand response
* Update homeassistant/components/griddy/sensor.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/griddy/config_flow.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Add ability request updated via entity update service.
* Improve error message about already configured
* Remove DEVICE_CLASS_POWER since we do not have a device class for cost
* remove setdefault that was left from previous refactor
* More detail on data naming
* Bump translation for testing
* git add the config flow tests
* s/PlatformNotReady/ConfigEntryNotReady/
* Review items
* git add the other missing file
* Patch griddypower
* reduce
* adjust target
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Added support for newer SamsungTV models
* Fixed legacy port
* store token in HA config directory
* Change token name
* rebasing and exception handling
* implement update
* fix error creating mediaplayer
* Debug logging
* Increase timeout
* Restore update timeout
* Store token_file path in config_entry
* Introduction of samsung bridge class
* Added bridge class functions
* Code cleanup
* more fixes
* Begin testing
* samsungtvws 1.2.0
* Config flow tests 0.1
* Fixed some mediaplayer tests
* Fixed fixture in media player
* use of constants and turn off
* more media player tests
* samsungtvws 1.3.1 and other fixes
* WS tv update rewritten
* more tests
* test_init
* fixed tests
* removed reset mock
* tests reset mock
* close_remote and tests
* deprecate port config
* deprecate port config 2
* deprecate port config 3
* save token only if needed
* cleanup
* better websocket protocol detection
* config removal
* Breakout tado zone code into a single place
* Resolve various incorrect states and add tests for known tado zone states
* Fix home and away presets
* Upgrade to PyTado 0.4.0 which improves http performance and fixes setting fan speed.
* Write state instead of calling for an update
* adjust codeowners
* Add tests for michael's tado and fix heatingPower.value
* Guards are much cleaner
* Adjust per review
* Remove hass passing
* Add a commit interval setting to recorder
* Make the default every 1s instead of immediate
* See attached py-spy flamegraphs for why 1s
* This avoids disk thrashing during event storms
* Make Home Assistant significantly more responsive on busy systems
* remove debug
* Add commit forces for tests that expect commits to be immediate
* Add commit forces for tests that expect commits to be immediate
* make sure _trigger_db_commit is in the right place (all effective "wait_recording_done" calls)
* De-duplicate wait_recording_done code
* alexa/capabilities.py: Fix TypeError Exception
- Remove division by zero try/catch -- there is no division
- Handle TypeError exception when current_volume = None
- Simplify math and return logic
* Add test for Alexa.Speaker's valid volume range
* Bump aiohomekit to get better reconnection handling and cleaner shutdowns.
* Read the ACTIVE characteristic and set ok/problem state
Also gets test coverage to 100%.
* Refactor zha core device _check_available().
Make it async, so we don't run it in a sync worker.
* Use random keep alive interval for zha device pings.
* Update tests.
* Update Yandex transport after API change (home-assistant#32431)
* Update mocked response for test (home-assistant#32431)
* Codestyle fixes (home-assistant#32431)
* multi attribute reads for lights
* catch specific exceptions
* get attributes
* fix mains powered update
* add guards and use get_attributes
* use debug for read failures
* cleanup
* update return value for read_attributes
* fix on with timed off
* add app support
* code cleanup, add additional test, add CONF_APPS storage logic for import
* simplify schema defaults logic
* remove unnecessary lower() and fix docstring
* remove default return for popping CONF_APPS during import update because we know entry data has CONF_APPS due to if statement
* further simplification
* even more simplification
* fix type hints
* move app configuration to separate step, fix tests, and only make app updates if device_type == tv
* remove errors variable from tv_apps and move tv_apps schema out of ConfigFlow for consistency
* slight refactor
* remove unused error from strings.json
* set unique id as early as possible
* correct which dictionary to use to set unique id in pair_tv step
* Returns an unencrypted location of all persons with device trackers
* Handle encrypted messages and exclude the poster's location
* Friends is by default False. Reformats with Black
* Updates the context init to account for the Friends option
* Fix Linter error
* Remove as a config option
* No longer imports encyrption-related functions in encrypt_message
* Fix initialization in test
* Test the friends functionality
* Bugfix for persons not having a location
* Better way to return the timestamp
* Update homeassistant/components/owntracks/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Linting and tid generation
* Fix test
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* added presets for switch devices
* added channel type to __init and const
* ran pylint on library so needed a few changes in names
* removed callback
* bool -> cv.boolean
* [soundtouch] workaround for API bug when removing multiple slaves from a zone at once
* [soundtouch] added additional attributes exposing multiroom zone info
* Fix update with slave entities
* Add zone attributes test
* Fix and clean up tests
* Fix typo
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Allow string values on zwave.set_node_value
This allows for:
* Accessing longer value_ids. In some cases, value ids in z-wave nodes are very large (17 digits in my case). Passing them as int does not seem to work well (python probably truncates the number), but passing them as string works fine
* Changing color values, which are represented as hex string
reformat test
* update services.yaml with string set_node_value
* Update image_processing.py
Adds save timestamp file and adds last_detection attribute
* Update test_image_processing.py
Adds test
* Adds assert pil_img.save.call_args
* Test timestamp filename
* Add test bad data
* Update test_image_processing.py
* Fix bad image data test
* Update homeassistant/components/sighthound/image_processing.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* code quality improvements
* code quality improvements and fixed tests
* explicitly set unique ids
* improve unique id creation
* remove entities from entity registry
* added test for removing entities from entity registry
* revert entity registry handling from sensor and test code
* check for entity registry removal in geolocation test case
* make import absolute; isort
* change quality scale
* add is_muted property and update tests
* black
* manually set is_muted on async_mute_volume calls to set state early
* combine two lines into one
* set is_muted to None when device is not on
* Move keypad battery implementation details into py-august
* Upgrade to py-august 0.22.0 which also adds gen2 doorbell battery data
* remove cruft from previous refactor
* refactoring for multi platform
* adopted test_bridge to refactoring
* refactoring tests for multi-platform
additional coverage in config and init
* comment for clarity
* more specific imports from lib
* library version bump
* removed async_update
* changed parameter order to start with hass
* removed pylint disable
* unsubscribe from signal dispatcher
inherit from Entity
* use device.unique_id
* changed hass_obj to hass
* added test for remove entity
bug fix from the test
* removed the polling try_connect. hate polling... it is now part of the async_setup()
significantly makes the code clearer and simplifies the tests
* removed leftover debug logs in the library
* changed tests to get the entry_id from hass
* changed place to assign hass.data only after success
* fixes for test_init
* removed assert
* removed device_info
* removed bridge internal from common
* modified test_bridge to work without the bridge directly
* removed bridge from test_existing_update
* changed update to not use bridge internals
* dyn_bridge fixture no longer used - removed
* Various code review items from previous PRs
* Add a test for fetching the doorbell camera image
* Switch to using UNIT_PERCENTAGE for battery charge unit
* Add tests for changed_by
* Allow managing Lovelace storage dashboards
* Make sure we do not allow duplicate url paths
* Allow setting sidebar to None
* Fix tests
* Delete storage file on delete
* List all dashboards
* Use f-strings in integrations starting with "H"
* Use f-strings in integrations starting with "I"
* Use f-strings in integrations starting with "J"
* Use f-strings in integrations starting with "K"
* Use f-strings in integrations starting with "L"
* Fix lint error
* Use join instead of f-string in homekit_controller
* Use local variables with f-strings
* Fix lint error
* Escape the characters in f-string
* Sort imports with isort in homeworks light
* Fix pylint error
* Fix broken tests
* Fix broken tests v2
* added entry listener that reloads the component
* fixed update with existing entry
* fixed import in test
* fixes
* library version
* removed unique_id
* fix
* fixed for no entries in hass.data
* fixed return value on abort
* moved to use async_entries
* removed unused import
* support pairing through config flow
* simplify import failure log messages
* remove unnecessary list comprehension
* bump pyvizio to add passing ClientSession in where it was missed
* show different message if user completes pairing through import
* remove dupe failure message since reasons for failure are the same in both instances
* remove extra constant
* add host reachability check during pairing workflow
* revert redundant connection check since check is implicitly done during pairing process
* fix rebase errors
* fix string
* updates based on review
* update docstring
* missed commit
* update import confirmation message to be less wordy
* use ConfigFlow _abort_if_unique_id_configured
* fix test
* Removing polling from august
* Now using subscribers to the detail and activity
* Fix hash to list keys
* continue to the next house if one fails
* Add async_signal_device_id_update
* Fix double initial update
* Handle self.hass not being available until after async_added_to_hass
* Remove not needed await
* Fix regression with device name
* async_step_user to async_configure
* fix for lint
* fix for pylint
* fix isort and black
* fix miss-fixed black
* fixing for the python37 coverage
* fix transmission definition
* fix for Black formatting
* fix type to abort
* clean up
* clean up for the test
* fix for the test
* refactor
* split test_flow_works to three tests
* revert the assert
* remove whitespaces for flake8
* apply patch function
* fix for the patch
* fix for the black
* remove mock_coro
* fix for the black
* hue to heos
* try to fix import
* fix for the black
* revert try to fix import
* Add a pytest fixture
* fix for the black
* Reduce August doorbell detail updates
* Doorbell images now get updates from the activity feed
* Tests for activity updates
* py-august now provides bridge_is_online for available state
* py-august now provides is_standby for available state
* py-august now provides get_doorbell_image (eliminate requests)
* remove debug
* black after merge conflict
* Centralize august activity updates
* Updates appear significantly more responsive
* Should address the community complaints about "lag"
* Reduce detail updates (device end points) to one hour interval
* Signal entities to update via dispatcher when new activity arrives
* Resolves out of sync state (skipped test is now unskipped)
* pylint
* fix merge conflict
* review comments
* Remove stray
* Address review items that can be done without refactor
* Reduce August doorbell detail updates
* Doorbell images now get updates from the activity feed
* Tests for activity updates
* py-august now provides bridge_is_online for available state
* py-august now provides is_standby for available state
* py-august now provides get_doorbell_image (eliminate requests)
* remove debug
* black after merge conflict
* Config Flow for sense
* Fix unique ids so they are actually unique (and migrate the old ones)
* Fix missing solar production
* Do not mark sensors available until they have data
* Address review items
* Address review round #2
* Add battery sensors for August devices
* Additional tests and cleanup in prep for config flow
and device registry
* pylint
* update name for new style guidelines - https://developers.home-assistant.io/docs/development_guidelines/#use-new-style-string-formatting
* Config Flow for august push
* Update homeassistant/components/august/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Address review items
* Update tests
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* dedup config flows
* use default (imported) options until user goes thru options flow
* address pr feedback
* correct key used to distinguish pro model
* Add observed entities to bayesian sensor
* Update binary_sensor.py to comply with style guidelines and test_binary_sensor.py to verify the entity_id
* Update binary_sensor.py and test_binary_sensor.py to include an additional attribute for observed entities
* Use of ATTR_ENTITY_ID and numeric key of observed entity
* Update binary_sensor.py
* Update test_binary_sensor.py to verify behavior
* Update to return a list without duplicates in the state attribute
* Update binary_sensor.py: rename of ATTR_ENTITY_ID into ATTR_OBSERVED_ENTITIES
* Rename new attribute into ATTR_OCCURRED_OBSERVATION_ENTITIES and fix test
* Use f-strings in integrations starting with F
* Use f-strings in tests for integrations starting with F
* Use f-strings in integrations starting with G
* Use f-strings in tests for integrations starting with G
* Fix pylint error
* Fix broken test
* Add and use speed constants
* Add and use meter based volume and area constants
* Add and use more mass unit constants
* Add and use concentration unit constants
* Add and use watts per square meter constant
* Use more time constants
* Use more data constants
* Add tests for legacy Script helper behavior
* Add Script helper if_running and run_mode options
- if_running controls what happens if Script run while previous run
has not completed. Can be:
- error: Raise an exception
- ignore: Return without doing anything (previous run continues as-is)
- parallel: Start run in new task
- restart: Stop previous run before starting new run
- run_mode controls when call to async_run will return. Can be:
- background: Returns immediately
- legacy: Implements previous behavior, which is to return when done,
or when suspended by delay or wait_template
- blocking: Returns when run has completed
- If neither is specified, default is run_mode=legacy (and if_running
is not used.) Otherwise, defaults are if_running=parallel and
run_mode=background. If run_mode is set to legacy then if_running must
be None.
- Caller may supply a logger which will be used throughout instead of
default module logger.
- Move Script running state into new helper classes, comprised of an
abstract base class and two concrete clases, one for legacy behavior
and one for new behavior.
- Remove some non-async methods, as well as call_from_config which has
only been used in tests.
- Adjust tests accordingly.
* Change per review
- Change run_mode default from background to blocking.
- Make sure change listener is called, even when there's an unexpected
exception.
- Make _ScriptRun.async_stop more graceful by using an asyncio.Event for
signaling instead of simply cancelling Task.
- Subclass _ScriptRun for background & blocking behavior.
Also:
- Fix timeouts in _ScriptRun by converting timedeltas to float seconds.
- General cleanup.
* Change per review 2
- Don't propagate exceptions if call from user has already returned
(i.e., for background runs or legacy runs that have suspended.)
- Allow user to specify if exceptions should be logged. They will still
be logged regardless if exception is not propagated.
- Rename _start_script_delay and _start_wait_template_delay for
clarity.
- Remove return value from Script.async_run.
- Fix missing await.
- Change call to self.is_running in Script.async_run to direct test of
self._runs.
* Change per review 3 and add tests
- Remove Script.set_logger().
- Enhance existing tests to check all run modes.
- Add tests for new features.
- Fix a few minor bugs found by tests.
* Use f-strings in integrations starting with B
* Use f-strings in integrations starting with C
* Use f-strings in integrations starting with D
* Use f-strings in integrations starting with E
* Fix pylint errors
* Fix pylint errors v2
* Fix tests
* Fix tests v2
* Deduplicate code in the august integration
* Add additional tests for august (more coming)
* Door state is now updated when a lock or unlock call returns
as the state is contained in the response which avoids
the confusing out of sync state
* revert
* document known issue with doorsense and lock getting out of sync (pre-existing)
* Address review comments
* Additional review comments
* Use f-strings in integrations starting with A
* Use f-strings in tests for integrations starting with A
* Fix pylint by renaming variable
* Fix nested for loop in f-string for aprs device_tracker
* Break long lines into multiple short lines
* Break long lines into multiple short lines v2
* Add and use time related constants
* Sort time constants and reuse them in data rate constants
* Fix greeneyemonitor import
* Fix greeneyemonitor import V2
* Fix failing here_travel_time test
* Add TIME_MONTHS and TIME_YEARS
* Use TIME_MINUTES in opentherm_gw and isy994
* Add and use TIME_MILLISECONDS
* Change inconsistent ones
* Add TIME_MICROSECONDS and TIME_WEEKS
* Use constants in apcupsd and travisci
* Fix import error in upnp sensor.py
* Fix isy994 sensor.py using TIME_YEARS
* Fix dyson tests
* Use TIME_SECONDS in more places
* Use TIME_DAYS in google wifi
* add unique_id to directv entities.
* add addiitional debug and fix tests.
* fix lint error.
* rework unique_id and flow a bit.
* review adjustments.
* review adjustments
* review adjustments
* review adjustments.
* review adjustments
* review adjustments
* review adjustments
* review adjustments
* lint
* use serial number for host unit and mac address for client units
* fix elsif
* update test with realistic client id
* lint
* Add ZHA core typing helper.
* Add aux_channels to ZHA rule matching.
* Add match rule claim_channels() method.
* Expose underlying zigpy device.
* Not sure we need this one.
* Move "base" channels.
* Framework for channel discovery.
* Make DEVICE_CLASS and REMOTE_DEVICE_TYPE default dicts.
* Remove attribute reporting configuration registry.
* Refactor channels.
- Refactor zha events
- Use compound IDs and unique_ids
- Refactor signal dispatching on attribute updates
* Use unique id compatible with entities unique ids.
* Refactor ZHA Entity registry.
Let match rule to check for the match.
* Refactor discovery to use new channels.
* Cleanup ZDO channel.
Remove unused zha store call.
* Handle channel configuration and initialization.
* Refactor ZHA Device to use new channels.
* Refactor ZHA Gateway to use new discovery framework.
Use hass.data for entity info intermediate store.
* Don't keep entities in hass.data.
* ZHA gateway new discovery framework.
* Refactor ZHA platform loading.
* Don't update ZHA entities, when restoring from zigpy.
* ZHA entity discover tests.
* Add AnalogInput sensor.
* Remove 0xFC02 based entity from Keen smart vents.
* Clean up IAS channels.
* Refactor entity restoration.
* Fix lumi.router entities name.
* Rename EndpointsChannel to ChannelPool.
* Make Channels.pools a list.
* Fix cover test.
* Fix FakeDevice class.
* Fix device actions.
* Fix channels typing.
* Revert update_before_add=False
* Refactor channel class matching.
* Use a helper function for adding entities.
* Make Pylint happy.
* Rebase cleanup.
* Update coverage for ZHA device type overrides.
* Use cluster_id for single output cluster registry.
* Remove ZHA typing from coverage.
* Fix tests.
* Address comments.
* Address comments.
* fixes per Martin Hjelmare
* pylint fix
* final fixes per request
* fixed unit tests for new config flow
* Added unit-tests to increase coverage. at 97% now
* Added unit tests for 100% coverage of component
* removed configured_host function and updated config_flow unit tests
* added a pylint directive since it tells me by mistake DOMAIN is not used
* fixed path (removed __init__)
* Update homeassistant/components/dynalite/light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/dynalite/light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* fixed the test as we moved from schedule_update_... to async_schedule
* Update homeassistant/components/dynalite/bridge.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* removed context from config_flow
changed test_init to use the core methods
* moved test_light to also use the core interfaces
* moved to config_entries.async_unload
* additional fixes for the tests
* pylint fix and removed unnecessary code
* Update tests/components/dynalite/test_light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/dynalite/test_light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/dynalite/test_light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/dynalite/test_light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/dynalite/test_light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/dynalite/test_light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/dynalite/test_light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/dynalite/test_light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/dynalite/test_light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* added break in loop
* removed last mock_coro reference
pylint fix
* added coverage for try_connect
* added check for a successful connection before bridge.async_setup succeeds
also added a "nowait" config option (default False) that avoids this check
* changed log level
* fixed accidental chmod I did
* fixed accidental change
* not storing config in bridge
* not patching asyncio
* moved CONFIG_SCHEMA into component
* moved all logs to start capitalized (and revised some of them)
* moved test_config_flow to not patch the DynaliteBridge
* also took DynaliteBridge patching out of test_init
* removed NO_WAIT
* fixes to SCHEMA
* changed _ in multi-word CONF
moved imports to component const.py
* removed tries
* removed redundant tests
* fixed some small change i broke in the library. only version update
* fixed rewuirements
* Update tests/components/dynalite/test_config_flow.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/dynalite/test_light.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/dynalite/test_config_flow.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* removed HIDDEN_ENTITY
removed hass in test fixture
* black fixes
* removed final piece of hidden_entity from light
fix in the library
updated config flow so if the entry is already set but with a different config, calls async_update_entry
* removed DATA_CONFIGS - no longer necessary
* pylint fixes
* added coverage
* use abort in config_flow
* test update
* removed logs
* test that update actually updates the entry
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Significantly reduce code in august integration
* Activity updates can now be processed by py-august
this allows us to eliminate the activity sync
code for the door sensors and locks
* Lock and door state can now be consumed from
the lock detail api which allows us to
remove the status call apis and reduce
the number of API calls to august
* Refactor the testing method for locks (part #1)
* Update homeassistant/components/august/binary_sensor.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Switch to asynctest instead of unittest for mock.patch
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Add support for MQTT device triggers
* Fix test, tweaks
* Improve test coverage
* Address review comments, improve tests
* Tidy up exception handling
* Fix abbreviations
* Rewrite to handle update of attached triggers
* Update abbreviation test
* Refactor according to review comments
* Refactor according to review comments
* Improve trigger removal
* Further refactoring
* Audit state handling of august bridges and sensors
This addresses issue #29980
* Prevent setting up august locks that do not have a bridge as they will never work
* Prevent locks showing available when their bridge is offline
* Prevent door sensors from showing available when their bridge is offline
* Prevent creating door sensors for locks that do not have them
* Prevent doorbells showing unavailable when they are in standby mode
* Set SCAN_INTERVAL for binary_sensors to 5 seconds as
data comes in from the activity endpoint more frequently
* Update homeassistant/components/august/__init__.py
raise if the detail is missing when checking doorsense
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Handle another place where the lock detail could not exist
* Address review comments
* Handle lock detail update failing and add test
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* add oauth functionality and additional attributes
* Add tests WIP
* Make mocks work the correct way
* Use CONF_TOKEN constant for config
* Remove twitch from .coveragerc
* Update homeassistant/components/twitch/sensor.py
Lets be consistent
Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
* Computes the features of a hue group as the union of the features of the bulbs in the group
* Moved create item to a function
* Added test for hue group features
* Adjust tests after speed up to restore coverage for HomematicIP Cloud
* Fix test data
* Fixes after review
* remove duplicate cade
* remove service marker
* Support XML conversion for RESTful sensors
Many devices continue to use XML for RESTful
APIs. Interfacing with these APIs requires custom
integrations or command line fork()/exec() overhead
which many of these devices can work with as if
they were JSON using xmltojson via this spec:
https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html
This change implements converting XML output to
JSON via xmltojson so it can work with the existing
rest sensor component. As the attributes that
usually need to be scraped are deeper in the document
support for passing in a template to find the
JSON attributes that have been added. JSON APIs that
do not have their attributes at the top level
can also benefit from this change.
* Auto convert xml, change out the template for jsonpath
* Address review items and potentially unexpected normalize behavior with jsonpath
* Revert "Address review items and potentially unexpected normalize behavior with jsonpath"
This reverts commit fe9e179092.
* json_dict[0] turned out to be needed
* Fix CalDAV parsing of recurring events
Some CaDAV servers (see: SOGo) return the original event that contains
the recurrence rules. The CalDAV calendar component sorts and filters
events based on their start and end dates, and was failing to properly
show recurring events based on these recurrence rules.
This this change checks if an event has recurrence rules and changes the
start/end dates of the event to today if the event is set to occur
today. This allows the rest of the component logic to function properly.
* Use date from nextmost occurence
* Adding unit tests
* Add endless event unit test
* Create new vevent for each event recurrence today
* Remove redundant unit test
* Add timezone to events that have none
Python cannot compare them otherwise.
* Simplify code, add comments & guard clause
* Add test for recurring all day event
* Account for all-day events
* Remove redundant code
* Remove redundant code
* Remove unnecessary deepcopy
* Add hourly recurring tests
* Add tests for hourly repeating event
* Fix unit test
* Use event.copy()
* Add support for displaying Daf Yomi
* Ran black --fast
* Added docstring to get_daf
* Further lint fixes
* Remove unnecessary else
* clarify code
* Use fstrings
* pull daf yomi from hdate
* Update manifest version for daf_yomi support
* fix variable usage
* Update requirements
* Also pass in today's date as well
* Rename date variable to daytime_date
* Add tests for daf yomi sensor
* Update stale test IDs
* update ipma component for pyipma 2.0
* fix wind speed; refactor forecast
* update requirements*.txt
* fix tests; update CODEOWNERS; update pyipma to 2.0.1
* minor changes as suggested in PR
* make lint happy
* fix mocking coroutines
* restore old unique id
* fix station lat/lon; update pyipma version
* add hourly forecast option to IPMA
* add forecast tests
* use for instead of lambda