Hi, I’m very new here to Home Assistant, possibly thinking of making a change from OpenHab.
But I’m struggling some with learning the language, syntax, etc in creating the various xx.yaml files.
I’m trying to to figure out how to create multiple ‘pages’ within the UI. From some of the examples I’ve seen, I have adding this to my configuration.yaml file
groups: !include groups.yaml
And created a groups.yaml file with the following for starters.
default_view:
view: yes
entities:
- group.environment
- group.media
environment:
name: environment
view: yes
entities:
- group.weather
#Media
media:
name: media
view: yes
entities:
- group.devices
Weather:
- sensor.date__time
- sensor.weather_icon
- sensor.weather_condition
- sensor.weather_summary
- sun.sun
- sensor.weather_cloud_coverage
- sensor.weather_dew_point
- sensor.weather_ozone
- sensor.weather_precip_type
- sensor.weather_precip_probability
- sensor.weather_precip
- sensor.weather_precip_intensity
- sensor.weather_pressure
- sensor.weather_visibility
- sensor.weather_nearest_storm_distance
- sensor.weather_wind_bearing
- sensor.weather_wind_speed
Devices:
- media_player.kodi
I know spacing can be tricky with these files, and I think i’m on the right track but not certain. I eventually want to have separate ‘pages’ by room or type (ie, sensors) as I think out the layout.
I do have dashing partially setup with OpenHab as well, so may give that a shot with HA as well once i get more confortable on how things work.
Any help is greatly appreciated.
Thanks
Paul
From your code, it isn’t clear to me what groups need to be tabs in your code above. view: yes
is only used for groups that you want to show as tabs, otherwise put in view: no
or just leave out the view variable.
Also, entities:
is required for every group. You left it out for the Weather and Devices groups.
Thanks for the fast response and help. For now, i’m trying to get a ‘Home’, ‘Environment’ and ‘Media’ tabs to show up.
Perhaps that is in where my issue is. I’ve been trying to follow the Example code from Brusc located here
And in those samples, there are no entities for the weather and devices. I was believing you setup each tab and then you tell it what groups/entities you want within each tab?
Strange, the documentation here states that entities is required. So I’m not sure how Brusc’s example works.
Here’s how I’d do it:
default_view:
name: home
view: yes
entities:
- group.whatevergroupthatisnotaview
environment:
name: environment
view: yes
entities:
- group.weather
#Media
media:
name: media
view: yes
entities:
- group.devices
Weather:
entities:
- sensor.date__time
- sensor.weather_icon
- sensor.weather_condition
- sensor.weather_summary
- sun.sun
- sensor.weather_cloud_coverage
- sensor.weather_dew_point
- sensor.weather_ozone
- sensor.weather_precip_type
- sensor.weather_precip_probability
- sensor.weather_precip
- sensor.weather_precip_intensity
- sensor.weather_pressure
- sensor.weather_visibility
- sensor.weather_nearest_storm_distance
- sensor.weather_wind_bearing
- sensor.weather_wind_speed
Devices:
entities:
- media_player.kodi
Notice the entity I put in the default_view group. The entities you had defined there were views. I don’t think you can nest a view into another view.
I think I’ve figured it out. You don’t need to have entities: for each section, but it probably doesn’t hurt. My issues turned out to more of a simple typo.
This
groups: !include groups.yaml
Needed to be this without that extra “s”
group: !include groups.yaml
Ah, man! Totally looked over the obvious Oh well, glad you got it working!
Btw, if you’re ever worried about spacing or indentation, you can run your yaml code through this online yaml parser. That can at least help you figure out if it’s a yaml issue or a HASS issue.