Hi all, can someone please tell me why my covers are not seen any more as entities since I changed my template,yaml files for depreciation legacy issues.
You have likely not migrated the configuration correctly.
To tell you what needs fixing we would need to see what config you changed to, and preferably from as well, though we can probably get by without that.
- cover:
- device_class: garage
open_cover:
- condition: state
entity_id:
- binary_sensor.garage_sensor
state: closed
match: all
- action: switch.toggle
target:
entity_id:
- switch.garage_door
close_cover:
- condition: state
entity_id:
- binary_sensor.garage_sensor
state: open
match: all
- action: switch.toggle
target:
entity_id:
- switch.garage_door
stop_cover:
- action: switch_toggle
target:
entity_id:
- switch.garage_door
default_entity_id: switch.garage_door
icon: "{% if is_state('binary_sensor.garage_sensor', 'opening') or is_state('binary_sensor.garage_sensor',
'closing') %}\n mdi:garage-alert\n{% elif is_state('', 'open')
%}\n mdi:garage-open\n{% else %}\n mdi:garage\n{% endif %}"
name: Garage Door
state: '{{ states(''binary_sensor.garage_sensor'') }}'
Where is this config located?
Hi thanks for reply
I have a gate and two shed roller doors and none of them have a cover under entities or developer tools states.
in template.yaml
Loads default set of integrations. Do not remove.
default_config:
Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
template: !include template.yaml
Also I suspect this:
- action: switch.toggle
target:
entity_id:
- switch.garage_door
Is not doing what you expect it to. The toggle action changes the switch state. i.e. if it was on it turns it off. If it was off it turns it on. It does not turn it on momentarily. For that you would need:
- action: switch.turn_on
target:
entity_id:
- switch.garage_door
- delay: 0.5
- action: switch.turn_off
target:
entity_id:
- switch.garage_door
Unless the switch turns off automatically due to some on device config?
What errors related to your covers do you see in your logs?
I put cover config in the templete.yaml folder
Shelly devices already handles the momentary pulse internally, just need straightforward on/off commands (no delays).
I do not have any errors in log
Did you restart after creating the new config?
Have you checked in Settings → Developer Tools → States that your cover entities exist?
yep, restarted many a time. and in developer tools - states the cover entities are not there. So, to make it work I put in the binary sensor entity in my custom button cards to get the gates etc to work. My apple home bridge does not see my covers any more so the rest of my family cannot use the their devices.
Is the cover entity automatically created when the cover template is created? sorry, trying hard to understand all this. It seemed to have disappeared after the upgrade depreciation legacy
that should work, although your template entity is suspect. The templates in them don’t make any sense but they will work.
the cover entity will appear in your system after a restart, if not, you’ll have errors in your logs telling you why it wasn’t created.
Based on what I see, your cover can be drastically reduced and behave the same way.
- cover:
- device_class: garage
open_cover:
- action: switch.toggle
target:
entity_id:
- switch.garage_door
close_cover:
- action: switch.toggle
target:
entity_id:
- switch.garage_door
stop_cover:
- action: switch.toggle
target:
entity_id:
- switch.garage_door
default_entity_id: cover.garage_door
name: Garage Door
state: '{{ states(''binary_sensor.garage_sensor'') }}'
EDIT: And in rewriting your cover, I found your problem. It seems you altered the configuration when copy/pasting this over because the migration wouldn’t have done this. This
should be
default_entity_id: cover.garage_door
There is an error in your logs stating that you incorrectly filled out default_entity_id. Not only that, but the system won’t let you restart with that either.
ok
will delete the old one and put this in and restart HA. Hopefully get a cover entity
yes, correct, I had to change it because I got the response
entity_id: cover.garage_door not valid or not found can’t remember
Ignore that. The Home Assistant Config Helper extension for VSCode has not been updated for the new syntax in ages.
You don’t actually need that line anyway. That entity id will be created from the name you have given your cover.
after a restart cover entity does not exist again

