This was working and had been for a year for two blinds but there are changes to the template in HA so I updated it to what was recommended, I did that as there was problem with one cover not being reported at all, just an “unknown” state.
Now, on changing the code both are reported as being unknown and I cannot figure out why, can anyone shed any light on this for me please.
I think this code is correct:
cover:
- platform: template
covers:
cover.cinema_front_window: # unique ID
friendly_name: "Cinema Front Window" # your name
optimistic: true # default when no state is available
open_cover:
- action: cover.open_cover
target:
entity_id: cover.cinema_front_window # change to your device id
close_cover:
- action: cover.close_cover
target:
entity_id: cover.cinema_front_window # change to your device id
stop_cover:
- action: cover.stop_cover
target:
entity_id: cover.cinema_front_window # change to your device id
- platform: template
covers:
cover.cinema_side_window: # unique ID
friendly_name: "Cinema Side Window" # your name
optimistic: true # default when no state is available
open_cover:
- action: cover.open_cover
target:
entity_id: cover.cinema_side_window # change to your device id
close_cover:
- action: cover.close_cover
target:
entity_id: cover.cinema_side_window # change to your device id
stop_cover:
- action: cover.stop_cover
target:
entity_id: cover.cinema_side_window # change to your device id
Which seems very weird… like it thinks there’s a problem and, it’s not tracking the state, that I can see plainly but it can’t recognise what the problem is it’s detecting.
This is neither the new nor the old format. The new format should be below template, not below cover anymore. And the platform line needs to go. But there need to be more changes done. The easiest way would be to roll back to the old format and install the lastest version if you hadn’t already. Don’t worry, the legacy format will still work for the next 6 months.
The new Home Assistant version 2025.12 will show you a repair message when it detects the old format. That repair message will show you the new yaml you need, ready for pasting. Also check the top post of the below thread with some tips on common mistakes people make when pasting the new yaml.
Thanks, I had followed the suggestion that popped up.
After updating there was a note that this was or, would be a problem along with code to replace what was there to correct for the update which I thought I’d followed as set out. Basically, I copied, pasted and where necessary changed the device IDs accordingly.
I am not by any means expert with YAML, I can kinda get by and figure a lot out as I go but I don’t know enough to be able to figure out things I don’t know and don’t have or can find an example for. If I have an example to follow, no problem.
What I’d done came up as valid in the editor and a YAML checker so I thought it’d be okay but there was obviously a problem because it doesn’t work.
I hadn’t found the other thread in my searching but, I was specifically looking for info on covers/blinds, not anything else.
I’ll play about with it and the docs, see if I can make it work.
If the template was correct in the first place it would not need alterations except maybe one I’ll get into later. If you use Studio Code as editor and it displays possible errors, ignore those. The plugin for HA is too old.
The old template is in a different place then the new one should go. It depends on how you included earlier templates where that is.
If you have a templates.yaml file, remove the top template: line from the nigrated yaml and put the new one in the file with the same indentation as the others.
If you do ot have the file, but you have a template: line in configuration.yaml, remove the top line too and place it under the existing template line, indented the same as what was already below.
If you did not have a template: line already, simply paste this in configuration.yaml.
There are nore advanced ways of including templates, so if you still get lost, ask.
I don’t use any code editors, I tend to make the changes as required only, I do not mess with code if I can possibly avoid it as I am not confident enough to muck about with it very much. Cards and such, okay but not functionality so much.
So I’ll edit only what I must, then use the checker in system and sometimes two external YAML checkers and I know those aren’t 100% but I’ve not had too may issues with that way of doing things.
In that other thread I did ask and someone has been helping me and I was given code as being correct however, it doesn’t seem to work. What I don’t know is, is it a code thing or a bug, or…whatever.