* Add last_reset to trigger based template sensors
* Add last_reset to state based template sensors
* CI check fixes
* Add pytests
* Add test cases for last_reset datetime parsing
* Add test for static last_reset value
* Fix ruff-format
* Keep capabilities up to date in the entity registry
* Warn if entities update their capabilities very often
* Fix updating of device class
* Stop tracking capability updates once flooding is logged
* Only sync registry if state changed
* Improve test
* Revert "Only sync registry if state changed"
This reverts commit 1c52571596c06444df234d4b088242b494b630f2.
* Avoid calculating device class twice
* Address review comments
* Revert using dataclass
* Fix unintended revert
* Add helper method
* Use ServiceValidationError for fan preset_mode
* Use _valid_preset_mode_or_raise to raise
* Move preset_mode validation to entity component
* Fix bond fan and comments
* Fixes baf, fjaraskupan and template
* More integration adjustments
* Add custom components mock and test code
* Make NotValidPresetModeError subclass
* Update homeassistant/components/fan/strings.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Keep bond has_action validation
* Move demo test asserts outside context block
* Follow up comment
* Update homeassistant/components/fan/strings.json
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fix demo tests
* Remove pylint disable
* Remove unreachable code
* Update homeassistant/components/fan/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Use NotValidPresetModeError, Final methods
* Address comments
* Correct docst
* Follow up comments
* Update homeassistant/components/fan/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add RGB, RGBW and RGBWW capability to template.light
Add the required unit test
Mute 'LightTemplate.async_turn_on' is too complex
Rename all HS color mode from a generic "Color" name to a specific "HS" name
* Bring back legacy "color" keyword
* Cleanup unrequested commented test
* Increase code coverage to 100%
* Remove confusing if that should never be false
* Apply suggestions from code review
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Move template update coordinator to its own file
* Add coordinator.py to .coveragerc
* Remove coordinator.py to .coveragerc
* Apply suggestions from code review
* Update homeassistant/components/template/coordinator.py
* Copy over fixes from upstream
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Extend template entities with a script section
This allows making a trigger entity that triggers a few times a day,
and allows collecting data from a service resopnse which can be
fed into a template entity.
The current alternatives are to publish and subscribe to events or to
store data in input entities.
* Make variables set in actions accessible to templates
* Format code
---------
Co-authored-by: Erik <erik@montnemery.com>
* Add common translations
* Add common translations
* Add common translations
* Add common translations
* Add common translations
* Add common translations
* Add common translations
* Add common translations
* Add image platform to the template integration
* Set a default name
* Fix typo
* Add tests
* Improve test coverage
* Derive content-type from fetched image