Here is my whole config file hope this helps. I am getting duplicate error on both group and automation.
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 0
longitude: 0
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: UTC
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
# Enables configuration UI
config:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
# Weather prediction
sensor:
- platform: yr
name: Weather
forecast: 24
monitored_conditions:
- temperature
# Text to speech
tts:
- platform: google
# Cloud
cloud:
mqtt:
broker: core-mosquitto
username: xxxxxx
password: !secret mq_pswd
binary_sensor:
- platform: mqtt
state_topic: "ESP-PIR-01/feeds/motion"
name: PIR Sensor
payload_on: "ON"
payload_off: "OFF"
qos: 0
device_class: motion
sensor 1:
platform: mqtt
name: "Garage Temperature"
state_topic: "sensor/temperature"
qos: 0
unit_of_measurement: "C"
sensor 2:
platform: mqtt
name: "Garage Humidity"
state_topic: "sensor/humidity"
qos: 0
unit_of_measurement: "%"
group:
Garage_Sensors:
name: Garage Sensors
entities:
- sensor.garage_temperature
- sensor.garage_humidity
Garage_Sensors View:
name: Garage View
view: yes
entities:
- group.Garage_Sensors
# Email Alerts configuration.yaml entry
notify:
- name: alert
platform: smtp
server: smtp.gmail.com
port: 587
timeout: 15
sender: [email protected]
encryption: starttls
username: [email protected]
password: xxxxxxsdfasdff
recipient: [email protected]
sender_name: My Home Assistant
automation:
- alias: Send message at a given time
trigger:
- platform: time
after: '16:45:00'
action:
service: notify.alert
data:
message: Test Email
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
Thanks that helped I have been struggling for weeks, this community rocks, now I get a new error message:
Error loading /config/configuration.yaml: mapping values are not allowed here
in “/config/configuration.yaml”, line 117, column 10
automation: !include automations.yaml
- alias: Send message at a given time
trigger:
- platform: time
after: '16:45:00'
action:
service: notify.alert
data:
message: Test Email
When you use !include automations. yaml, HA expects to find a separate .yaml file called automations.yaml. In there you will put your automations without the argument automation:
here is my example: configuration.yaml
automation: !include_dir_merge_list automations/
and I have created a FOLDER (because I used “dir_merge”) called automations.
In this folder I have many .yaml file called anything I want. These files have my automations. This is just for organizing purposes.
Here you can read more:
In your case, you have to create a file called “automations.yaml” and put your automations in there.
# The configuration.yaml file
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 0
longitude: 0
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: UTC
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
# Enables configuration UI
config:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
# Weather prediction
sensor:
- platform: yr
name: Weather
forecast: 24
monitored_conditions:
- temperature
# Text to speech
tts:
- platform: google
# Cloud
cloud:
mqtt:
broker: core-mosquitto
username: xxxxxx
password: !secret mq_pswd
binary_sensor:
- platform: mqtt
state_topic: "ESP-PIR-01/feeds/motion"
name: PIR Sensor
payload_on: "ON"
payload_off: "OFF"
qos: 0
device_class: motion
sensor 1:
platform: mqtt
name: "Garage Temperature"
state_topic: "sensor/temperature"
qos: 0
unit_of_measurement: "C"
sensor 2:
platform: mqtt
name: "Garage Humidity"
state_topic: "sensor/humidity"
qos: 0
unit_of_measurement: "%"
# Email Alerts configuration.yaml entry
notify:
- name: alert
platform: smtp
server: smtp.gmail.com
port: 587
timeout: 15
sender: [email protected]
encryption: starttls
username: [email protected]
password: fgjfjaaborptzcvm
recipient: [email protected]
sender_name: My Home Assistant
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
The automations.yaml file:
- alias: Send message at a given time
trigger:
- platform: time
after: '16:45:00'
action:
service: notify.alert
data:
message: Test Email
Thanks all for the continued info. I am focusing on one error at a time, i.e. automation. I now get this error message after moving it to the automation.yaml file
Invalid config for [automation]: [after] is an invalid option for [automation]. Check: automation->trigger->0->after. (See /config/configuration.yaml, line 115). Please check the docs at https://home-assistant.io/components/automation/
- alias: Send message at a given time
trigger:
- platform: time
after: '16:45:00'
action:
service: notify.alert
data:
message: Test Email