Getting started - switches

Hi All,

Looking for help. I’ve been researching how to get started for my application. I think the initial guide on the hassio website assumes that you’ve installed WIFI lights when it explains how to get the lights to turn on at sunset. https://www.home-assistant.io/getting-started/automation/ However, I’ve either installed smart wall switches or wall plugs not lights

I believe I learned how to get hassio to know my switch is a light by creating the following YAML code in my configuration file - formatting/code checks good:

lights (plugs):
  - platform: switch
    name: left table light
    entity_id: switch.left_table 
  - platform: switch
    name: right table light
    entity_id: switch.right_table 
  - platform: switch
    name: left night light
    entity_id: switch.3653b9655d3b7
  - platform: switch
    name: right night light
    entity_id: switch.30753811d
  - platform: switch
    name: garage door lights
    entity_id: switch.6715478e9371
  - platform: switch
    name: Front Hall light
    entity_id: switch.6715ce7d61
  - platform: switch
    name: Front door light
    entity_id: switch.671547daef8

However the home assistant throws this error… and I’m not sure where to go to figure out how to do the integration. Component error: lights - Integration ‘lights’ not found.

Any direction links or other is completely appreciated!

must be

light:

It’s a keyword, not a commentary.

The example makes no assumptions that the lights are WiFi.

The term hassio was eliminated many months ago. In the context of how you are using the term, it should simply be “Home Assistant”.

I believe I learned how to get Home Assistant to know my switch …

Your configuration is incorrect. The following line:

lights (plugs):

instructs Home Assistant to use an integration called lights which does not exist (and that’s why you get the error message: Component error: lights - Integration ‘lights’ not found.).

If you want a switch to be handled as a light then simply follow the instructions in the Light Switch integration. It explains you must list your switches under the light domain name like this:

light:
  - platform: switch
    name: left table light
    entity_id: switch.left_table 
  - platform: switch
    name: right table light
    entity_id: switch.right_table

Got it! Thank you both! I made the fix - rebooted and voila! (I will be very careful around formatting. I gather I could use the # symbol for documenting what each section is for?

image

Yes, you can use # to indicate the line is a comment.

Please consider marking m0wlheld’s post, or my post, with the Solution tag (whichever post you believe helped to clarify the cause of the problem and how to resolve it). It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has an accepted solution (i.e. “problem solved”). This helps users find answers to similar questions.