Hello,
I’m struggling with one of my automations. I have two identical files (for troubleshooting purposes only):
- hvac.yaml
- hvac_beta.yaml
(see content below)
When I use hvac_beta.yaml with hvac.yaml commented out then hvac automations are working.
When I use hvac.yaml with hvac_beta.yaml commented out then hvac automations are NOT working.
It seems like hass has the path to hvac.yaml cached somewhere and it’s not working as it should. Also, I’m not sure if that matters but I may have removed automations from GUI manually when I first played with hvac.yaml.
I know I could just rename the file and move on but I’m trying to understand what am I doing/did wrong so I don’t repeat that mistake.
Any hints will be greatly appreciated!
Thanks
More info:
I’m using packages and I’m including them like this:
---
homeassistant:
# customize: !include customize.yaml
packages: !include_dir_named packages
# Enables configuration UI
config:
# Incorporate latest changes
default_config:
My file structure is as follows:
├── automations.yaml
├── configuration.yaml
├── known_devices.yaml
├── packages
│ ├── automations
│ │ ├── fire_alarm.yaml
│ │ ├── hvac.yaml
│ │ ├── hvac_beta.yaml
│ │ ├── security_alarm.yaml
│ │ └── watering.yaml
│ ├── groups
│ │ └── groups.yaml
│ ├── helpers
│ │ ├── hvac.yaml
│ │ └── security_alarm.yaml
│ ├── integrations
│ │ ├── device_tracker.yaml
│ │ ├── discord.yaml
│ │ ├── fibaro.yaml
│ │ ├── http.yaml
│ │ ├── tts.yaml
│ │ ├── waze.yaml
│ │ └── xiaomi_miio.yaml
│ ├── scenes
│ │ └── scenes.yaml
│ └── scripts
│ └── scripts.yaml
└── secrets.yaml
hvac.yaml/hvac_beta.yaml:
automation:
# ---------------------------------------------------------------------------- #
# HVAC Bathroom Automation #
# ---------------------------------------------------------------------------- #
- id: hvac_bathroom
alias: "HVAC Bathroom"
initial_state: true
trigger:
- platform: time_pattern
minutes: "/15"
condition:
condition: and
conditions:
- condition: numeric_state
entity_id: weather.ishome
attribute: temperature
below: 15
- condition: state
entity_id: group.family
state: home
action:
- choose:
- conditions:
- condition: time
after: "05:30:00"
before: "06:29:00"
sequence:
- service: climate.set_temperature
entity_id: climate.thermostat_bathroom
data:
temperature: "{{ states('input_number.target_temperature_bathroom') | float }}"
- conditions:
- condition: time
after: "06:30:00"
before: "07:30:00"
sequence:
- service: climate.set_temperature
entity_id: climate.thermostat_bathroom
data:
temperature: "{{ states('input_number.target_temperature_bathroom') | float - 2 }}"
- conditions:
- condition: time
after: "19:00:00"
before: "20:29:00"
sequence:
- service: climate.set_temperature
entity_id: climate.thermostat_bathroom
data:
temperature: "{{ states('input_number.target_temperature_bathroom') | float }}"
- conditions:
- condition: time
after: "20:30:00"
before: "21:30:00"
sequence:
- service: climate.set_temperature
entity_id: climate.thermostat_bathroom
data:
temperature: "{{ states('input_number.target_temperature_bathroom') | float - 2 }}"
default:
- service: climate.set_temperature
entity_id: climate.thermostat_bathroom
data:
temperature: 7
# ---------------------------------------------------------------------------- #
# HVAC Bedroom Automation #
# ---------------------------------------------------------------------------- #
- id: hvac_bedroom
alias: "HVAC Bedroom"
initial_state: true
trigger:
- platform: time_pattern
minutes: "/15"
condition:
condition: and
conditions:
- condition: numeric_state
entity_id: weather.ishome
attribute: temperature
below: 15
- condition: state
entity_id: group.family
state: home
action:
- choose:
- conditions:
- condition: time
after: "21:00:00"
before: "23:59:00"
- condition: template
value_template: "{{ states('sensor.thermometer_bedroom') | float < states('input_number.target_temperature_bedroom') | float }}"
sequence:
- service: climate.set_temperature
entity_id: climate.thermostat_bedroom
data:
temperature: "{{ states('input_number.target_temperature_bedroom') | float }}"
- conditions:
- condition: time
after: "00:00:00"
before: "01:59:00"
- condition: template
value_template: "{{ states('sensor.thermometer_bedroom') | float < states('input_number.target_temperature_bedroom') | float - 1 }}"
sequence:
- service: climate.set_temperature
entity_id: climate.thermostat_bedroom
data:
temperature: "{{ states('input_number.target_temperature_bedroom') | float - 1 }}"
- conditions:
- condition: time
after: "02:00:00"
before: "04:00:00"
- condition: template
value_template: "{{ states('sensor.thermometer_bedroom') | float < states('input_number.target_temperature_bedroom') | float - 2 }}"
sequence:
- service: climate.set_temperature
entity_id: climate.thermostat_bedroom
data:
temperature: "{{ states('input_number.target_temperature_bedroom') | float - 2 }}"
default:
- service: climate.set_temperature
entity_id: climate.thermostat_bedroom
data:
temperature: 7
# ---------------------------------------------------------------------------- #
# HVAC Living Room Automation #
# ---------------------------------------------------------------------------- #
- id: hvac_living_room
alias: "HVAC Living Room"
initial_state: true
trigger:
- platform: time_pattern
minutes: "/15"
condition:
condition: and
conditions:
- condition: numeric_state
entity_id: weather.ishome
attribute: temperature
below: 15
- condition: state
entity_id: group.family
state: home
action:
- choose:
- conditions:
- condition: time
after: "06:00:00"
before: "22:00:00"
- condition: template
value_template: "{{ states('sensor.thermometer_living_room') | float < states('input_number.target_temperature_living_room') | float }}"
sequence:
- service: climate.set_temperature
entity_id:
- climate.thermostat_living_room_terrace
- climate.thermostat_living_room_corner
data:
temperature: "{{ states('input_number.target_temperature_living_room') | float }}"
default:
- service: climate.set_temperature
entity_id:
- climate.thermostat_living_room_terrace
- climate.thermostat_living_room_corner
data:
temperature: 7
# ---------------------------------------------------------------------------- #
# HVAC Kitchen Automation #
# ---------------------------------------------------------------------------- #
- id: hvac_kitchen
alias: "HVAC Kitchen"
initial_state: true
trigger:
- platform: time_pattern
minutes: "/15"
condition:
condition: and
conditions:
- condition: numeric_state
entity_id: weather.ishome
attribute: temperature
below: 15
- condition: state
entity_id: group.family
state: home
action:
- choose:
- conditions:
- condition: time
after: "06:00:00"
before: "22:00:00"
- condition: template
value_template: "{{ states('sensor.thermometer_kitchen') | float < states('input_number.target_temperature_living_room') | float }}"
sequence:
- service: climate.set_temperature
entity_id:
- climate.thermostat_kitchen
data:
temperature: "{{ states('input_number.target_temperature_living_room') | float }}"
default:
- service: climate.set_temperature
entity_id:
- climate.thermostat_kitchen
data:
temperature: 7