Files
fresh-home/components/switches/template.yaml
T
2025-12-03 20:23:33 -05:00

218 lines
6.7 KiB
YAML

template:
- switch:
- unique_id: 9d2081d6-6ae2-4e51-81d3-cd8679905de8
# This shouldn't be used because it just re-circulates the air in the house.
# Since there aren't any returns in the basement, the upstairs air recirculates itself
# which accomplishes nothing
# I'd need to get some kind of fresh air intake and a damper
turn_on:
- action: ecobee.set_fan_min_on_time
data:
fan_min_on_time: 60
turn_off:
- action: ecobee.set_fan_min_on_time
data:
fan_min_on_time: 0
default_entity_id: switch.thermostat_fan_mode
name: Thermostat Fan Mode
state: >-
{% if state_attr('climate.thermostat', 'fan_min_on_time') | int(default=0) < 5 %}
{{'false'}}
{% else %}
{{ 'true' }}
{% endif %}
- unique_id: 81b29c14-23e0-4215-a3dd-21a52564d44e
default_entity_id: switch.master_bedroom_light_cycle
name: "Master Bedroom Light Cycle"
state: "{{ is_state('input_boolean.master_bedroom_light_cycle', 'on') }}"
turn_on:
action: input_boolean.turn_on
data:
entity_id: input_boolean.master_bedroom_light_cycle
turn_off:
action: input_boolean.turn_off
data:
entity_id: input_boolean.master_bedroom_light_cycle
icon: >-
{% if is_state('input_boolean.master_bedroom_light_cycle', 'on') %}
mdi:party-popper
{% else %}
mdi:party-popper
{% endif %}
- unique_id: 000baf7e-3065-432e-a3eb-e4f1d40f8028
default_entity_id: switch.girls_room_light_cycle
name: "Girls Room Light Cycle"
state: "{{ is_state('input_boolean.girls_room_light_cycle', 'on') }}"
turn_on:
action: input_boolean.turn_on
data:
entity_id: input_boolean.girls_room_light_cycle
turn_off:
action: input_boolean.turn_off
data:
entity_id: input_boolean.girls_room_light_cycle
icon: >-
{% if is_state('input_boolean.girls_room_light_cycle', 'on') %}
mdi:party-popper
{% else %}
mdi:party-popper
{% endif %}
- unique_id: bbdb494c-2ec9-4840-a1e9-c20268136ebb
default_entity_id: switch.boys_room_light_cycle
name: "Boys Room Light Cycle"
state: "{{ is_state('input_boolean.boys_room_light_cycle', 'on') }}"
turn_on:
action: input_boolean.turn_on
data:
entity_id: input_boolean.boys_room_light_cycle
turn_off:
action: input_boolean.turn_off
data:
entity_id: input_boolean.boys_room_light_cycle
icon: >-
{% if is_state('input_boolean.boys_room_light_cycle', 'on') %}
mdi:party-popper
{% else %}
mdi:party-popper
{% endif %}
- unique_id: 267f9562-7fcd-42cd-aa8d-b801b1a18ffc
default_entity_id: switch.front_room_light_cycle
name: "Front Room Light Cycle"
state: "{{ is_state('input_boolean.front_room_light_cycle', 'on') }}"
turn_on:
action: input_boolean.turn_on
data:
entity_id: input_boolean.front_room_light_cycle
turn_off:
action: input_boolean.turn_off
data:
entity_id: input_boolean.front_room_light_cycle
icon: >-
{% if is_state('input_boolean.front_room_light_cycle', 'on') %}
mdi:party-popper
{% else %}
mdi:party-popper
{% endif %}
- unique_id: fff0f6b6-dfcf-4bda-b21e-1cf1ef385cd1
default_entity_id: switch.great_room_light_cycle
name: "Great Room Light Cycle"
state: "{{ is_state('input_boolean.great_room_light_cycle', 'on') }}"
turn_on:
action: input_boolean.turn_on
data:
entity_id: input_boolean.great_room_light_cycle
turn_off:
action: input_boolean.turn_off
data:
entity_id: input_boolean.great_room_light_cycle
icon: >-
{% if is_state('input_boolean.great_room_light_cycle', 'on') %}
mdi:party-popper
{% else %}
mdi:party-popper
{% endif %}
- unique_id: fc8be266-37ce-4eac-a2c5-2398f84681bb
default_entity_id: switch.computer_area_light_cycle
name: "Computer Area Light Cycle"
state: "{{ is_state('input_boolean.computer_area_light_cycle', 'on') }}"
turn_on:
action: input_boolean.turn_on
data:
entity_id: input_boolean.computer_area_light_cycle
turn_off:
action: input_boolean.turn_off
data:
entity_id: input_boolean.computer_area_light_cycle
icon: >-
{% if is_state('input_boolean.computer_area_light_cycle', 'on') %}
mdi:party-popper
{% else %}
mdi:party-popper
{% endif %}
- unique_id: be11d0e0-4858-4381-8528-23c16179bbe3
default_entity_id: switch.nursery_bed_lights
state: "{{ is_state('light.black_bed_wled', 'on') or is_state('light.white_bed_wled', 'on') }}"
turn_on:
action: select.select_option
target:
entity_id:
- select.black_bed_wled_preset
- select.white_bed_wled_preset
data:
option: Bouncing Balls
turn_off:
action: select.select_option
target:
entity_id:
- select.black_bed_wled_preset
- select.white_bed_wled_preset
data:
option: "Off"
icon: >-
mdi:led-strip-variant
- unique_id: 5cba4cb3-1fa0-482f-b419-edde77030500
default_entity_id: switch.virtual_reality
state: "{{ is_state('switch.vr_headset_plug', 'on') }}"
turn_on:
action: homeassistant.turn_on
data:
entity_id:
- switch.vr_headset_plug
turn_off:
action: homeassistant.turn_off
data:
entity_id:
- switch.vr_headset_plug
icon: >-
mdi:virtual-reality
# all_chores:
# unique_id: templateswitch.all_chores
# state: "{{ is_state('input_boolean.grocy_next_chores', 'on')}}"
# turn_on:
# action: homeassistant.turn_on
# data:
# entity_id:
# - input_boolean.grocy_next_chores
# turn_off:
# action: homeassistant.turn_off
# data:
# entity_id:
# - input_boolean.grocy_next_chores
# boys_room_chores:
# unique_id: templateswitch.boys_room_chores
# state: "{{ is_state('input_boolean.boys_room_next_chores', 'on')}}"
# turn_on:
# action: homeassistant.turn_on
# data:
# entity_id:
# - input_boolean.boys_room_next_chores
# turn_off:
# action: homeassistant.turn_off
# data:
# entity_id:
# - input_boolean.boys_room_next_chores
# computer_area_chores:
# unique_id: templateswitch.computer_area_chores
# state: "{{ is_state('input_boolean.computer_area_next_chores', 'on')}}"
# turn_on:
# action: homeassistant.turn_on
# data:
# entity_id:
# - input_boolean.computer_area_next_chores
# turn_off:
# action: homeassistant.turn_off
# data:
# entity_id:
# - input_boolean.computer_area_next_chores