Files
home-assistant-blueprints/blueprints/automation/weekend_mode_apply_settings.yaml
John Ogle 16319e5bc4 Fix blueprint input section structure to nest under blueprint key
Move input definitions from root level to be nested under the blueprint
section. Home Assistant requires input declarations to be under
blueprint.input, not at the root level.

This fixes import errors:
- "Missing input definition for adaptive_lighting_switch, led_color_entity, mode_input_select"
- "Missing input definition for sunrise_time, sunset_time, weekend_mode_boolean, adaptive_lighting_switch, max_brightness"
- "Missing input definition for toggle_time, weekend_mode_boolean"
2025-12-21 17:53:47 -08:00

85 lines
2.2 KiB
YAML

blueprint:
name: Weekend Mode Apply Settings
description: Adjust AL settings when weekend mode toggles
domain: automation
input:
weekend_mode_boolean:
name: Weekend Mode Boolean
description: Toggle helper for weekend mode
selector:
entity:
domain: input_boolean
adaptive_lighting_switch:
name: Adaptive Lighting Switch
description: AL switch to adjust
selector:
entity:
domain: switch
integration: adaptive_lighting
sunrise_time:
name: Weekend Sunrise Time
description: Delayed sunrise time for weekends
default: "10:00:00"
selector:
time:
sunset_time:
name: Weekend Sunset Time
description: Extended sunset time for weekends
default: "01:00:00"
selector:
time:
max_brightness:
name: Weekend Max Brightness
description: Reduced max brightness for weekends
default: 60
selector:
number:
min: 1
max: 100
step: 1
unit_of_measurement: "%"
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id: !input weekend_mode_boolean
- platform: homeassistant
event: start
variables:
weekend_boolean: !input weekend_mode_boolean
al_switch: !input adaptive_lighting_switch
sunrise_time: !input sunrise_time
sunset_time: !input sunset_time
max_brightness: !input max_brightness
weekend_active: "{{ is_state(weekend_boolean, 'on') }}"
action:
- choose:
# Weekend mode ON - Apply adjustments
- conditions: "{{ weekend_active }}"
sequence:
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ al_switch }}"
data:
sunrise_time: "{{ sunrise_time }}"
sunset_time: "{{ sunset_time }}"
max_brightness: "{{ max_brightness }}"
use_defaults: current
# Weekend mode OFF - Reset to defaults
- conditions: "{{ not weekend_active }}"
sequence:
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ al_switch }}"
data:
use_defaults: configuration