I have installed Home Assistant with Home Assistant OS on raspberry, now I’m trying to set up a package, so I created the packages folder inside the homeassistant folder and add it to configuration.yaml, but when I try to restart the server I always have this error
Logger: homeassistant.setup
Source: setup.py:221
First occurred: 21:42:11 (1 occurrences)
Last logged: 21:42:11
Setup failed for ‘packages’: Integration not found.
here my configration.yaml
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
#########################################
http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
hacs:
token: myToken
api:
alexa:
smart_home:
filter:
exclude_domains:
- alarm_control_panel
- alert
- automation
- binary_sensor
- button
- camera
# scuri/tapparelle
- cover
- device_tracker
- fan
- group
- humidifier
- input_boolean
- input_button
- input_datetime
- input_number
- input_select
- lock
- media_player
- number
- person
- remote
- scene
- script
- select
- sensor
- siren
- switch
- timer
- weather
- zone
#include_entities:
#includere progressivamente, in questa sezione, le entità da esporre ad Alexa.
include_domains:
- light
- vacuum
- climate
sonoff:
username: myUser
password: myPassword
force_update: [temperature, power]
scan_interval: '00:00:30' # (optional) default 5 minutes
sensors: [temperature, humidity, power, current, voltage]
mode: local
# Load packages
packages: !include_dir_named packages
Doing packages is almost as much an art as it is a science. I have a pretty complex, deeply nested package I use on mine and prefer it monumentally over an endless Configuration.yaml file.
You need to test and play with how you set them up. For example:
My configuration.yaml (truncated for demonstration):
And I keep going. As a result I know precisely where my various setups are and I don’t have to dig. Notice on use include_dir_list on the sensors, this says get all the files under /config/entities/binary_sensors and merge each file content into a list, the type of thing the “binary_sensors:” configuration is looking for if it were in configuration.yaml by itself.
I say you need to play around because you won’t know, as a beginner, which needs to be a list or which needs to be treated differently. So you do your configs and packages and then you go to Developer Tools → YAML and “Check Configuration” and it will tell you if you tried to include a list when only a string was needed (or whatever).
You don’t have to do it all at once, do just one small piece at a time, say binary_sensors to start, leave the rest in configuration.yaml until you start to get a feel for it. It can be quite daunting at first but once you start to get the hang of it then it becomes second nature.
as noted above (but not explicitly stated) the “packages:” line needs to be put under the “homeassistant:” key (I put it at the top just for ease of demonstration - it can go anywhere as long as the indentation is maintained):
# Load packages
homeassistant:
packages: !include_dir_named packages
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
#########################################
http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
hacs:
token: myToken
api:
alexa:
smart_home:
filter:
exclude_domains:
- alarm_control_panel
- alert
- automation
- binary_sensor
- button
- camera
# scuri/tapparelle
- cover
- device_tracker
- fan
- group
- humidifier
- input_boolean
- input_button
- input_datetime
- input_number
- input_select
- lock
- media_player
- number
- person
- remote
- scene
- script
- select
- sensor
- siren
- switch
- timer
- weather
- zone
#include_entities:
#includere progressivamente, in questa sezione, le entità da esporre ad Alexa.
include_domains:
- light
- vacuum
- climate
sonoff:
username: myUser
password: myPassword
force_update: [temperature, power]
scan_interval: '00:00:30' # (optional) default 5 minutes
sensors: [temperature, humidity, power, current, voltage]
mode: local
but I’m not sure how it works using the “default_config:” entry since I don’t use it