input_boolean:
  domestina:
    name: Domestina time
    icon: mdi:broom

group:
  domestina_disabled_automations:
    - automation.presence_arrival_detection
    - automation.presence_coming_home
    - automation.routine_coming_home_left_work
    - automation.presence_leaving_home
    - automation.alarm_wake_up
    - automation.lighting_living_room_toggle_ceiling_lights_on_desk_switch_single_click
    - automation.lighting_living_room_toggle_ambient_lights_on_desk_switch_double_click
    - automation.media_sonos_volume_up_on_bathroom_switch_click
    - automation.music_living_room_play_pause_on_desk_switch_hold
    - automation.music_master_bedroom_play_pause_on_switch_hold
    - automation.notification_door_opened
    - automation.bedroom_mode_change
    - automation.bedroom_mode_toggle_on_bedside_switch_hold
    - automation.security_door_opened_while_away
    - automation.purifier_turn_on_low_humidity
    - automation.purifier_turn_on_low_air_quality
    - automation.purifier_turn_off_okay_humidity
    - automation.system_announce_start

automation:
  - alias: Domestina · Automate start
    trigger:
      platform: time
      at: "08:30:00"
    condition:
      - condition: time
        weekday: thu
    action:
      - service: input_boolean.turn_on
        entity_id: input_boolean.domestina

  - alias: Domestina · Start
    trigger:
      platform: state
      entity_id: input_boolean.domestina
      from: "off"
      to: "on"
    action:
      - service: input_boolean.turn_on
        entity_id: input_boolean.guest_mode
      - service: automation.turn_off
        entity_id: group.domestina_disabled_automations


  - alias: Domestina · Automate end
    trigger:
      platform: time
      at: "13:00:00"
    condition:
      - condition: time
        weekday: thu
    action:
      - service: input_boolean.turn_off
        entity_id: input_boolean.domestina

  - alias: Domestina · End
    trigger:
      platform: state
      entity_id: input_boolean.domestina
      from: "on"
      to: "off"
    action:
      - service: input_boolean.turn_off
        entity_id: input_boolean.guest_mode
      - service: automation.turn_on
        entity_id: group.domestina_disabled_automations
