I’m looking for some help with splitting out my configuration.yaml file. I read through the Splitting up the configuration help docs but I seem to be missing something.
This is the code in my configuration.yaml file I am trying to split out into another page…
template:
- sensor:
- name: Downstairs HVAC Activity
state: "{{ state_attr('climate.downstairs_thermostat', 'hvac_action') }}"
sensor:
# HVAC Stats
- platform: history_stats
name: Downstairs Heating Today
entity_id: sensor.downstairs_hvac_activity
state: "heating"
type: time
start: "{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}"
end: "{{ now() }}"
- platform: history_stats
name: Downstairs Cooling Today
entity_id: sensor.downstairs_hvac_activity
state: "cooling"
type: time
start: "{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}"
end: "{{ now() }}"
- platform: template
sensors:
hvac_today:
friendly_name: "Downstairs HVAC Today"
unit_of_measurement: "H"
value_template: '{{ states("sensor.downstairs_cooling_today") |float + states("sensor.downstairs_heating_today") | float }}'
utility_meter:
heating_time_daily:
source: sensor.downstairs_heating_today
name: Downstairs Heating Time Daily
cycle: daily
heating_time_weekly:
source: sensor.downstairs_heating_today
name: Downstairs Heating Time Weekly
cycle: weekly
heating_time_monthly:
source: sensor.downstairs_heating_today
name: Downstairs Heating Time Monthly
cycle: monthly
heating_time_yearly:
source: sensor.downstairs_heating_today
name: Downstairs Heating Time Yearly
cycle: yearly
cooling_time_daily:
source: sensor.downstairs_cooling_today
name: Downstairs Cooling Time Daily
cycle: daily
cooling_time_weekly:
source: sensor.downstairs_cooling_today
name: Downstairs Cooling Time Weekly
cycle: weekly
cooling_time_monthly:
source: sensor.downstairs_cooling_today
name: Downstairs Cooling Time Monthly
cycle: monthly
cooling_time_yearly:
source: sensor.downstairs_cooling_today
name: Downstairs Cooling Time Yearly
cycle: yearly
hvac_time_filter:
source: sensor.downstairs_hvac_today
name: Downstairs HVAC Time Filter
cycle: yearly
I tried to edit this…
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
By changing it to this…
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
hvac: !include hvac.yaml
Then, of course, I moved all that code into the hvac.yaml file but upon restart I get an error…
Logger: homeassistant.setup
Source: setup.py:275
First occurred: 4:40:49 PM (1 occurrences)
Last logged: 4:40:49 PM
Setup failed for 'hvac': Integration not found.
Do I need to create a yaml file for everything such as utility_meter, history_stats, sensor & template or is there some way to put everything is one hvac.yaml file?
Any help or insight is appreciated, thanks in advance!