* Add initial implementation of calendar trigger
This is an initial implementation of a calendar trigger, that supports
triggering on calendar start time.
See architecture proposal in:
https://github.com/home-assistant/architecture/discussions/700
* Address reviewer feedback
* Use f-strings for all tests
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove logging f-strings, and move to main code
* Remove mypy ignore
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update calendar triggers to use new calendar data model
* Update tests/components/calendar/test_trigger.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Rewrite tests using freezegun
Rewrite tests using freezegun and improve edge case handling, and use utc consistently for all alarms.
* Update homeassistant/components/calendar/trigger.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/calendar/trigger.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Increase test coverage based on pr feedback
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Fix race in _process_recorder_platform
* Update homeassistant/components/recorder/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update tests
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use new aiohttp based google client library in gcal_sync.
* Use base url in tests for shorter string
* Remove unnecessary line of code
* Jump to gcal-sync-0.4.1
* Update tests/components/google/conftest.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update to gcal_sync 0.5.0 incorporating PR feedback
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add Insteon USB discovery
* Update tests/components/insteon/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Black
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* feat: make this variable available in template entities
This makes the variable `this` available in template entities.
It will simplify the use of self-referencing template entities.
Because, without this, we have to repeat the entity id every time.
If we can solve this without explicitly spelling the entity id,
code can be re-used much better.
As a side-effect, this will allow to use `variables`-like patterns,
where attributes can be used as variables to calculate subsequent attributes or state.
Example:
```yaml
template:
sensor:
- name: test
state: "{{ this.attributes.test }}"
# not: "{{ state_attr('sensor.test', 'test' }}"
attributes:
test: "{{ now() }}"
```
* expose entity_id instead of this
* add test
* Refactor to expose this variable
* Tweak repr dunder
Co-authored-by: Erik <erik@montnemery.com>
* Add target_temp_step to generic_thermostat
* Add target_temp_step to generic_thermostat : fix default + add tests
* Add target_temp_step to generic_thermostat : fix test by using new 'units_imperial' fixture