Open ildar170975 opened 3 months ago
Mysteriously this variant works:
version: 1
devices:
Test Cover:
- <<: &ref_settings
platform: cover
initial_value: 'closed'
open_close_duration: 5
open_close_tick: 1
Test Cover abc:
- *ref_settings
and this - does NOT:
version: 1
devices:
Test Cover:
- <<: &ref_settings
platform: cover
initial_value: 'closed'
open_close_duration: 5
open_close_tick: 1
Test Cover abc:
- *ref_settings
Test Cover xyz:
- *ref_settings
The glitch could be related somehow to an omitted "name" option - this code works (creates 3 covers):
version: 1
devices:
Test Cover:
- <<: &ref_settings
platform: cover
initial_value: 'closed'
open_close_duration: 5
open_close_tick: 1
name: testing_cover
Test Cover abc:
- <<: *ref_settings
name: testing_cover_abc
Test Cover xyz:
- <<: *ref_settings
name: testing_cover_xyz
Consider this code:
Trying to add these covers:
Seems that 2 covers are created properly:
And no errors/warnings in Log.
Then consider this code:
which is supposed to produce same result. But it gives an error:
No covers are created.
There is an error in Log: 2024-08-23 19:36:40.903 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry imported - virtual for virtual Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/virtual/init.py", line 149, in async_setup_entry await vcfg.async_load() File "/config/custom_components/virtual/cfg.py", line 306, in async_load platform = entity.pop(CONF_PLATFORM) ^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'platform'