Switch Allowance

blueprint:
  name: Switch Allowance
  description: Turns a switch off after an allotted time
  domain: automation
  input:
    Switch:
      name: Switch
      description: This Switch will turn off after allowed time.
      selector:
        entity:
          domain: switch
    duration:
      name: Duration
      description: The amount of allotted time. (HH:MM:SS)

trigger:
  platform: state
  entity_id: !input Switch
  to: 'on'
  for: !input duration

action:
  service: switch.turn_off
  entity_id: !input Switch
mode: single
2 Likes

It looks like this is just a normal switch template, not a lutron caseta specific one except for the name.

1 Like

Edited it to be generic

Does this work for you? I get an error when trying to create an automation using the blueprint - it seems it’s trying to use a device_id rather than entity_id:

2020-12-19 15:39:03 ERROR (MainThread) [homeassistant.components.automation] Blueprint Change device status after period of time generated invalid automation with inputs OrderedDict([('trigger_time', '00:02:00'), ('trigger_device', '91a42907065311ebb26e3548969ee84c'), ('trigger_state', 'on')]): not a valid value for dictionary value @ data['action'][0]['entity_id']. Got None

L’ho modificato per entità light e funziona perfettamente.