Grouping switches help

I am trying to group the living room lights and as always HAAS is being and ASS and doesn’t load the home page. What am I doing wrong?

group:
Main_Livingroom_Lights:
name: Living Room Lights
entities:
- switch.hifi
- switch.office
- switch.sofa

I’ve tried to do the “hass --script check_config” command in putty but that isn’t working either. I get the message "Config does not exist: /home/pi/.homeassistant/configuration.yaml
"

FIRST
You have to do is figure out why your configuration.yaml does not exist.
look in /home/pi/.homeassitant is there a configuration.yaml file there?

THEN
your group spacing is all wrong (or its not pre-formatted on your post).
Here is the example from the help page, edited to match your config

group:
  Main_Livingroom_Lights:
    name: Living Room Lights
    entities:
      - switch.hifi
      - switch.office
      - switch.sofa

Hi treno

My configuration file is under:
Network/HASSBIAN/homeassistant/configuration.yaml

I did the all in one installation as per BRUH and havent moved anything so not sure why it can’t be “found”

My spacing is as per your example, I’ll try paste it correctly again…my spacing screws up when I try to the code blocks or syntax whatsits </> or "

groups
Main_Livingroom_Lights:
name: Living Room Lights
entities:
- switch.hifi
- switch.office
- switch.sofa

So to use preformatted text in these forums you use ctrl shift c or you can put with at the end to

Can you show us your switch code?

groups:
  Main_Livingroom_Lights:
    name: Living Room Lights
    entities:
      - switch.hifi
      - switch.office
      - switch.sofa

Thanks for the ctr shift c tip, it works!
switch code? Do you mean the IDE code for example?
these particular entities are all TP Link switches which work well independently through HAAS but when I try the group I get stuck.

Well, the place where you can see they’re defined in your cofiguration yaml

And no problem!

switch:
  - platform: tplink
    host: 192.168.1.9
    name: 'HiFi'
  - platform: tplink
    host: 192.168.1.13
    name: 'Sofa'
  - platform: tplink
    host: 192.168.1.2
    name: 'Office'

This is how they are shown in the yaml file

Just noticed you said it’s called groups and it should be group:

sorry that was a typo, I have checked my yaml file and it is group and not groups. I’ve been struggling with groups for a while and like a lot of stuff on HAAS had given up on it because I found it so frustrating but I thought I would have another look at it and came across the youtube channel from diyautomate which talks about groups etc.
I followed his simple group set up and entered it character by character but it just doesnt work. I have the same problem with the script check_config so maybe my installation is iffy. I don’t know…

Yeah I used this guy and BRUH too. They’ve been fantastic in helping me get started. Do you mind posting your whole config with anything personal commented out? Who knows if it could be something earlier

homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 51.5608
longitude: -0.2233
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 45
# 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: Europe/London

# Show links to resources in log and frontend
# introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

http:
  # Uncomment this to add a password (recommended!)
  # api_password: !secret api_password
  # Uncomment this if you are using SSL or running in Docker etc
  # base_url: example.duckdns.org:8123

# Checks for available updates
updater:

# 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:

# Track the sun
sun:

#TPLink switches
switch:
  - platform: tplink
    host: 192.168.1.9
    name: 'HiFi'
  - platform: tplink
    host: 192.168.1.13
    name: 'Sofa'
  - platform: tplink
    host: 192.168.1.2
    name: 'Office'

    


#Groups
group:
  Main_Livingroom_Lights:
    name: Living Room Lights
    entities:
      - switch.hifi
      - switch.office
      - switch.sofa

        
# Neato 
neato:
  username: *****
  password: *****
    
  

# Weather Prediction
sensor:
  platform: yr
      
      
# Text to speech
tts:
  platform: google

group: !include groups.yaml


#MQTT Sensors and swithches
mqtt:
  broker: 192.168.1.3
  port: 1883
  client_id: home-assistant-1
  keepalive: 60
  username: *****
  password: *****
  protocol: 3.1
  
sensor 1:
  platform: mqtt
  state_topic: 'office/sensor1'
  name: 'BtR Temperature'
  unit_of_measurement: '°C'
  value_template: '{{ value_json.temperature }}'

sensor 2:
  platform: mqtt
  state_topic: 'office/sensor1'
  name: 'BtR Humidity'
  unit_of_measurement: '%'
  value_template: '{{ value_json.humidity }}'
  
sensor 3:
  platform: mqtt
  state_topic: "home/br/nb/temp"
  name: 'HiFi Temp'
  unit_of_measurement: '°C'
 

sensor 4:
  platform: mqtt
  state_topic: 'home/br/nb/humid'
  name: 'HiFi Humid'
  unit_of_measurement: '%'
  
  
switch 1:
  platform: mqtt
  name: "MVHR"
  state_topic: "/house/switchConfirm1/"
  command_topic: "/house/switch1/"
  payload_on: "1"
  payload_off: "0"
  qos: 0
  retain: true       
 
switch 2:
  platform: mqtt
  name: "Speakers Bedroom"
  state_topic: "home/br/nb"
  command_topic: "home/br/nb"
  payload_on: "1"
  payload_off: "0"
  qos: 0
  retain: true 

  
automation:
  trigger:
    platform: numeric_state
    entity_id: sensor.btr_humidity
    value_template: '{{ value_json.humidity }}'
    above: 75
#below: 99
  action:
    service: light.turn_on
    entity_id:
      - sensor.btr_humidity
      - switch.sofa

get rid of this line

3 Likes

Amazing… it’s worked!
Thank you so much for taking the time to help me with this. User error as always…

It’s no problem. I think what’s funny is that I’m almost positive diyautomate made the same mistake in one of his videos.

Good luck with HASS. She’s cruel but well worth it!

I do have to dedicate more time to going through the tutorials from start to finish but I find my mind start to wander and I just want to get cracking on with it.
It is very rewarding when it all comes together.

Thank you again and have a good weekend.

Hello! I’m new to this and … I spent two days trying to make it work, and just deleting that was enough. THANK YOU!
Greetings from Arg