* Make google calendar loading API centric, not loading from yaml
Update the behavior for google calendar to focus on loading calendars based on the
API and using the yaml configuration to override behavior. The old behavior was
to first load from yaml, then also load from the API, which is atypical.
This is pulled out from a larger change to rewrite calendar using async and config
flows.
Tests needed to be updated to reflect the new API centric behavior, and changing
the API call ordering required changing tests that exercise failures.
* Update to use async_fire_time_changed to invoke updates
* Mqtt Notify service draft
* fix updates
* Remove TARGET config parameter
* do not use protected attributes
* complete tests
* device support for auto discovery
* Add targets attribute and support for data param
* Add tests and resolve naming issues
* CONF_COMMAND_TEMPLATE from .const
* Use mqtt as default service name
* make sure service has a unique name
* pylint error
* fix type error
* Conditional device removal and test
* Improve tests
* update description has_notify_services()
* Use TypedDict for service config
* casting- fix discovery - hass.data
* cleanup
* move MqttNotificationConfig after the schemas
* fix has_notify_services
* do not test log for reg update
* Improve casting types
* Simplify obtaining the device_id
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* await not needed
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Improve casting types and naming
* cleanup_device_registry signature change and black
* remove not needed condition
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add options flow support to HelperConfigFlowHandler
* Add config flow for cover, fan, light and media_player groups
* Update according to review comments
* Update translation strings
* Update translation strings
* Copy schema before adding suggested values
* Improve zwave_js custom triggers and services
* Switch from pop to get
* Support string boolean values
* refactor and add coverage
* comments and additional assertions
* Add config flow for switch.light
* Refactor according to code review
* Setup light switch from config entry
* Improve async_resolve_entity
* Prepare for multiple steps
* Remove name and options flow from switch light
* Check type before adding description to schema keys
* Remove options flow enabler
* Copy name from the switch
* Move helper flows to new file
* Improve test coverage
* Fix name
* Remove dead code from abstract method
* Remove manifest 'helper' option
* Validate registry entry id before forwarding to light platform
* Improve test
* Add translations
* Improve config entry setup
* Log when config entry fails setup
* Update homeassistant/components/switch/__init__.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Improve google calendar test quality and share setup
Improve google calendar test quality by exercising different combinations of
cases and new coverage. The existing test cases do achieve very high coverage,
however some of the subtle interactions between the components are not as well
exercised, which is needed when we start changing how the internal code is
structured moving to async or to config entries.
Ipmrovement include:
- Exercising additional cases around different types of configuration parameters
that control how calendars are tracked or not tracked. The tracking can be
configured in google_calendars.yaml, or by defaults set in configuration.yaml
for new calendars.
- Share even more test setup, used when exercising the above different scenarios
- Add new test cases for event creation.
- Improve test readability by making more clear the differences between tests
exercising yaml and API test calendars. The data types are now more clearly
separated in the two cases, as well as the entity names created in the two
cases.
* Undo some diffs for readability
* Improve pydoc readability
* Improve pydoc readability
* Incorporate improvements from Martin
* Make test parameters a State instance
* Update test naming to be more correct
* Fix flake8 errors