* Add test for invalid usercode
* Add usercodes to totalconnect.
* Update existing tests for usercodes
* Fix tests
* Add test for invalid usercode
* Add usercodes to totalconnect.
* Update existing tests for usercodes
* Fix tests
* Remove YAML support
* Fix conflict
* Bump to total_connect_client 0.56
* Change Exception to HomeAssistantError
* Fix config_flow.py
* Simplify async_setup since no yaml
* Remove import from config flow and tests
* Add reauth and test for it. Various other fixes.
* Fix pylint in __init__
* Show config yaml as deprecated
* separate config_flow and init tests
* Assert ENTRY_STATE_SETUP_ERROR in init test
* Add test for reauth flow
* Fix reauth and tests
* Fix strings
* Restore username and usercode with new passord
* Correct the integration name
* Update tests/components/totalconnect/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/totalconnect/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update .coveragerc
* Add test for invalid auth during reauth
* Bump total-connect-client to 0.57
* Fix .coveragerc
* More tests for usercodes
* Fix usercode test
* Reload config entry on reauth
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove unused "fibaro_fgs222" discovery hint
* Simplify multilevel switch current value discovery schema
* Force iBlinds v2.0 devices to be discovered as cover entities
* Rename discovery test file
* Simplify homekit runs and service calls
Now that the homekit server is async, call_service
and run are running in the Home Assistant event loop
* remove comment
* remove another comment
* add thermostat fan mode and fan state support
* return when fan mode is not supported
* use get just in case
* validate state key is in states so we dont have to use get
* pylint
* Support HLS stream discontinuity.
* Clarify discontinuity comments
* Signal a stream discontinuity on restart due to stream error
* Apply suggestions from code review
Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com>
* Simplify stream discontinuity logic
SSDP scans no longer runs in the executor
This is an interim step that converts the async_upnp_client
response to netdisco's object to ensure fully backwards
compatibility
* Fix exception in stream idle callback
Fix bug where idle timeout callback fails if the stream previously exited.
* Add a test for stream idle timeout after stream is stopped.
* Add clarifying comment to idle timer clear method
* Clear hls timer only on stop
Separate the HLS stream view logic out of StreamOutput since the hls
stream view is about to get more complex to track discontinuities. This
makes the idle timeout, shutdown, and coupling between hls and record
more explicit.
HomeKit pairings and accessory ids from versions 0.109 and earlier are no longer
migrated on upgrade. Users upgrading directly to 2021.3 from 0.109
and older should upgrade to 2021.2 first if they wish to preserve
HomeKit configuration and avoid re-pairing the bridge.
This change does not affect upgrades from 0.110 and later.
* Remove stream_worker dependencies on Stream
Removee stream_worker dependencies on Stream and split out the logic
for writing segments to a stream buffer.
* Stop calling internal stream methods
* Update homeassistant/components/stream/worker.py
Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com>
* Reuse self._outputs when creating new streams
Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com>
* Update test harness to allow discovery_info testing.
This is a needed update, before the whole config is converted
to the new structure, because it allows test of both the old
and new configuration style.
The following changes have been made:
- Combine test functions into a single base_test.
- Prepare for new mock by combining the 2 common test functions into one.
- Change mock to be only modbusHub
- Do not replace whole modbus class, but only the class that
connects to pymodbus (modbusHub). This allows test of modbus
configurations and not only component configurations, and is needed
when testing discovery activated platform.
- Add test of climate.
Warning this is merely test of discovery,
the real cover tests still needs to be added.
- Add test of cover.
Warning this is merely test of discovery,
the real cover tests still needs to be added.
* Update comment for old config
* Do not use hass.data, but instead patch pymodbus library.
* Add test of configuration (old/new way as available).
* Move assert to test function.
Make assert more understandable by removing it from the helper.
add base_config_test (check just calls base_test) to make it clear if
test is wanted or just controlling the config.
* use setup_component to load Modbus since it is an integration.
* Optimized flow in test helper.
* Correct missed review changes
* Adjust return value for device trigger
* Drop cannot connect
* Always assume there is a unique id
* No need to yield
* Update homeassistant/components/philips_js/media_player.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Move typing to init
* Adjust typing instead of returning lambda
* Explicity return None
* Coerce into int
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add config flow to philips_js
* Adjust name of entry to contain serial
* Use device id in event rather than entity id
* Adjust turn on text
* Deprecate all fields
* Be somewhat more explicit in typing
* Switch to direct coordinator access
* Refactor the pluggable action
* Adjust tests a bit
* Minor adjustment
* More adjustments
* Add missing await in update coordinator
* Be more lenient to lack of system info
* Use constant for trigger type and simplify
* Apply suggestions from code review
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add target to service call API
* Fix _async_call_service_step
* CONF_SERVICE_ENTITY_ID overrules target
* Move merging up before processing schema
* Restore services.yaml
* Add test
* Change the API boundary between stream and camera
Shift more of the stream lifecycle management to the camera. The motivation is to support stream urls that expire
giving the camera the ability to change the stream once it is created.
* Document stream lifecycle and simplify stream/camera interaction
* Reorder create_stream function to reduce diffs
* Increase test coverage for camera_sdm.py
* Fix ffmpeg typo.
* Add a stream identifier for each stream, managed by camera
* Remove stream record service
* Update homeassistant/components/stream/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Unroll changes to Stream interface back into camera component
* Fix preload stream to actually start the background worker
* Reduce unncessary diffs for readability
* Remove redundant camera stream start code
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Unlikely sqlite and mysql, postgresql throws ProgrammingError instead
of InternalError or OperationalError when trying to create an index
that already exists.
* Remove dependencies on keepalive from StremaOutput and stream_worker
Pull logic from StreamOutput and stream_worker into the Stream
class, unifying keepalive and idle timeout logic. This prepares
for future changes to preserve hls state across stream url changes.
* Enhance MQTT cover platform
Allow combining of position and state of MQTT cover
Add template and fix optimistic in set tilt position
Add tests
* Add abbreviations
* Add tests and stopped state
* Cleanup & fix range for templates
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add support for limited templates (no HASS access)
* Pass variables to automation triggers
* Support templates in MQTT triggers
* Spelling
* Handle trigger referenced by variables
* Raise on unsupported function in limited templates
* Validate MQTT trigger schema in MQTT device trigger
* Add trigger_variables to automation config schema
* Don't print stacktrace when setting up trigger throws
* Make pylint happy
* Add trigger_variables to variables
* Add debug prints, document limited template
* Add tests
* Validate MQTT trigger topic early when possible
* Improve valid_subscribe_topic_template
* Mark entities as unavailable when they are removed but are still registered
* Add sync_entity_lifecycle to collection helper
* Remove debug print
* Lint
* Fix tests
* Fix tests
* Update zha
* Update zone
* Fix tests
* Update hyperion
* Update rfxtrx
* Fix tests
* Pass force_remove=True from integrations
Co-authored-by: Erik <erik@montnemery.com>