Absolute newbie.
I am attempting to install the TPlink switch, among other things, on HA.
I have entered the following in config.yaml:
switch:
-platform: tplink
host: IP address
Saved
Checked config in GUI page, OK
Restarted HA (core)
I then expected TP to show up in the GUI, but it doesn’t. Should it???
I have obviously missed something or have the wrong expectations.
Two of my devices show up, automatically loaded by HA.
Usually you need to restart home assistant in order to see any components you add.
Also when you part of your config file, post it as code so it stays formatted. You can do that with the button that looks like “</>”.
Thank you. I did restart but no luck.
Sorry about the formatting, I couldn’t get that to work either!!
See heading!
Put an extra 4 spaces in front of all of you config file text. Or just select your config text and push the “</>” button.
These tags
This will be formatted as code.
And will respect spacing.
I think you need a space between - and platform in your first line, like this:
- platform: tplink
name: "HS100-01"
host: 192.168.1.9
try this : https://raw.githubusercontent.com/skalavala/HassBot/master/format.gif
the concept still applies here.
No luck so far, but I’m sure the problem is one of syntax, which shows how much I’ve got to learn.
After typing in config.yaml can you please advise the sequence of events thereafter?
I save, control + O, then restart HA. Have I missed any thing?
This is taken directly from my config file.
switch:
- platform: tplink
host: 192.168.0.21
name: Kettle
Hope that helps
Apologies my indentation was incorrect in my post for some reason which I did not notice so have corrected it (taken directly from my config.yaml file)
slightly different from RoadkillUK’s post but will still work
Thank you and bluey for your replies. No luck so far.
I have tried every variation I can think of both in configuration.yaml and
saving and restarting. Must be something wrong with set-up, but, the loaded devices all work OK. These were installed by HA.
Are you using GROUPS?
No, no groups. I have come to a complete stand still on this. Tried for hours. Now run out of ideas.
You need to add it to a group to see it in the UI.
If you click on the <>
under ‘Developer Tools’ do you see it listed there somewhere? If you do, you just need to add it to a group to see it on the front page.
Only automatically discovered devices ‘show up automatically’ in the UI. If you manually configure something you have to add it to the UI yourself, by using groups, even if you just use one default group.
No, it does not show up in groups. Do I have to enter Entity etc. myself. If so I do not have enough syntax vocabulary to do so. Hoping to learn as I go.
Thanks for your reply.
Find the entity on the <>
page.
The entity_id is what you will use to add the device to a group view. You should look at the GROUPS documentation.
The entity does not show up in group documentation. I feel that when I save the entry in config.yaml it is not being transferred to the HA GUI screen. No matter what I try, nothing shows up anywhere. Very frustrating.
I don’t know what this means.
After you make changes to the config, restart home assistant. It should show up in the dev-states page.
I’ve only been using Home Assistant (Hass.io version) for a couple of months myself. A TP Link switch was one of my first inclusions. Maybe this will help, step by step:
In your configuration.yaml you should have something like:
switch:
- platform: tplink
host: 192.168.0.20
name: my_switch_name
Use the appropriate IP address for your switch in the host field, and pick whatever name you want. Now completely restart Home Assistant -.
You can’t just restart the core. If you change configuration.yaml, you have to completely restart Home Assistant. (Restarting the core is only for changes to the customize.yaml file - don’t worry about that for now.)
Next, find its entity name by looking in the States page: On the left sidebar, at the bottom, under Developer Tools, click on the <> symbol to see the States page. Because I’ve given the switch a name in the code above, the entity name should be switch.my_switch_name.
To put the switch in a group (named My Switches), put the following in configuration.yaml:
group:
my_switches:
name: My Switches
entities:
- switch.my_switch_name
Now restart Home Assistant again. You should then see a card on the GUI with your switch. Hope that helps…
You might have the wrong IP address for the switch.
Thank you for your detailed reply but no go I’m afraid. I’m on Hassbian.
I followed your instructions carefully for the first part, saved, control+O,
restarted, but when I looked in the States page, nothing. I carried on to the second part, group, followed the same routine with the same result.
It does appear the config.yaml is not sending info to HA. Which, it seems to me, either I have got the set-up wrong or I am saving my programming incorrectly.
Thank you all for your interest.