Light Allowance

This blueprint will turn a light off after a preset allotted time.

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

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

action:
  service: light.turn_off
  entity_id: !input light_switch
mode: single