Help requested with Template Cover - Grouping

Hi all,

I have recently implemented the Rollease integration (thank you to all those who worked on this) and would now like to create a group template which will display and allow control of blinds by percentage, and also update the icon as per the example shown on the Template Cover integration example.

I can easily achieve the control (including percentage) of the groups via the Cover Group functionality, but thought i might also be able to apply the icon update depending on state.

My question is:
Under the Multiple Covers section of the Template Cover integration, the yaml contains a number of sections, I know i don’t have to have the automation: section, but do i have to have all the other sections? and if so, can i split them into their own files, ie customize.yaml, cover.yaml, sensor.yaml…?

homeassistant:
  customize:
    cover_group:
      assume_state: true

cover:
  - platform: template
    covers:
      cover_group:
        ...
        entity_id:
          - cover.bedroom
          - cover.livingroom

sensor:
  - platform: template
    sensors:
       ...
            closed
          {% endif %}

script:
  cover_group:
    sequence:
        ...
            - cover.livingroom
          position: "{{position}}"

automation:
  - alias: "Close covers at night"
    trigger:
     ...
          entity_id: cover.cover_group
          position: 25

thanks in advance

Looks like you need all of them, except for the automation.

Yes you can separate them like this. Just a suggestion, I would use a package for this and put everything related to your covers in a package called covers.yaml, but that’s just my way of thinking.

Thanks for the prompt response, can i just clarify, if i was to add the code to a package, you mention above just to add the code to a new file and name it covers.yaml, and should i then just add this into my packages folder? Apart from adding the entities to the frontend, do i have to reference the covers.yaml anywhere else?

I have already setup a packages folder as

  # Packages
  packages: !include_dir_named packages

Thanks,

Yes, exactly.

No, your packages config is sufficient.

Thank you for all your help.