Disabling/enabling entities in bulk depending on season

I have a number of smart plugs that are reserved for controlling Christmas lights. For most of the year they are boxed in the garage but still show as unavailable entities in home assistant. Is there an easy built in way to hide these when they are not needed without having to manually go through each one?

There are actions to Hide or Disable devices or entities in Franck's custom integration, Spook.

To accomplish what you want you can use a static list of target entities...

action: homeassistant.hide_entity
data:
  entity_id: 
    - light.christmas_tree
    - switch.singing_santa
    - sensor.reindeer_detector
    - input_datetime.royal_speech
    - sensor.minced_pies_consumed

... or, make it a little more automatic by using Labels and a short template. Then you only have to label entitles as you find them and they will automatically be included whenever the action runs:

action: homeassistant.hide_entity
data:
  entity_id: |
    {{ label_entities('Seasonal Christmas') }}
1 Like

Thanks. This got me quite close but unfortunately the issue I'm having is it's actually the integration showing errors not the devices. For the Tapo integration each device seems to have a separate integration entity so I get the following error even if the sub device is disabled

Failed setup, will retry: Unable to communicate with the device connect: Device 192.168.1.136 responded with 403 to handshake1

And example of how I use it:

      - alias: Assume integration is disabled, so start it.
        action: homeassistant.enable_config_entry
        data:
          config_entry_id: "{{ config_entry_id('media_player.apple_tv_family_room') }}"
      - wait_template: |
          {{ states('media_player.apple_tv_family_room') not in
              ['unavailable','unknown'] }}
        timeout: "00:00:45"
1 Like