so i have several Tplink Light Switchs working with HA
now i made a card with them and wanted to do a Status so when a Light switch is On it will say ON or OFF… but i cant get rid of the Toggle Switch … i dont like Glance… i like the Entity…
Left Side Name right Side Status
just like an excel spread sheet…
but glances just do squares
class for a Binary Sensor… but Tplink Kasa doesnt show you can add a Binary sensor to that switch…
so how do i add it to the Entities card… and changea Toggle Switch to a word saying ON or OFF or Open and Closed say or my own word if i dont like ON or OFF
i dont know what your talking about i not complaining
Explain it exactly how to write the code if i was 5 years old
explain each line of code i need… detail answers… more detail then whats provided on that page
what you talking about code snippets.,. its properly formated its copied right out configurartion yaml
i dunno what your talking about typos, i said i randomy adding code from the link your provided.
i do not know what any of thoise examples do… Im 100% guessing… you need to explain it to someone that knows absolutly nothing…
so the code above gives me this error
Error loading /config/configuration.yaml: while parsing a block mapping
in “/config/configuration.yaml”, line 86, column 7
expected , but found ‘’
in “/config/configuration.yaml”, line 110, column 15
and i not complaing
i figured it be Simple like a Check Box a Toggle in the Entity Cards that says Display State or Display Toggle switch… or the word print <switch.sdfasfd.>=state so it prints the state word off or on
it does not like my name “test” for a sensor name
it doesnt tell me what a slug of the test means either
since i testing the name of the sensor is called “test”
Ok, but that’s not what it sounded like. It sure sounded like you were complaining that it wasn’t as simple as you would have liked.
I can certainly do that, but generally I don’t assume the person requesting help needs that level of hand holding.
No, it was not properly formatted. Notice the difference between your first post of the code and the second. Do they look the same to you? Can you tell if the code is indented properly in the first post? If you’re not sure what I’m talking about, see #11 in this topic.
In your second post I can see at least three basic problems. First, the indentation is wrong. Second you’re using the wrong kind of quote marks. They need to be the simple ' or " characters, not the fancy curly quote characters. Third you’re missing quotes at the ends of the templates. Also, you don’t show what that code is “under.” I.e, is it under sensor: or binary_sensor:? (It should be the latter.)
i get confused… i only started using home assistant basiclly since December… i dont understand half of any of these examples… none of which do not go in depth there are hardly any videos out there… i saw Dr ZZs but that doesnt help. i tried to use Node-Red and that has just confused me and doesnt work…
it frustrates me cuz all i figure was just simple radio button or a toggle to say display Toggle or Display State
just like the toggle Button Show Icon thats what i was looking for Instead of Show Icon toggle switch it be
Show State or Show Toggle by toggling
let me try your code… cuz it frustrates me… as i having issues with remote_gpio
and spent last couple hours googling and reading articles how to convert before i asked for help in here…
give me a few min ill copy and pates and then do i just load it inthe the entity page? or does it automaicllty change the entity card to on off
as i dont know when you write in configuration.yaml or when you write code in a entity card
so i copied and paste it so didnt give no errors but i dont know the next steps? how to change the toggle switch
the show code editor for the entities card is
type: entities
entities:
- entity: switch.h_hot_water_tank_switch
name: House Hot Water Tank
icon: 'mdi:water'
- entity: switch.b_hot_water_tank_switch
name: Building Hot Water Tank
- entity: binary_sensor.water_position
name: Sauna Water Valve Position
icon: 'mdi:valve'
theme: christmas
title: Status
That should have created two binary_sensor entities, specifically binary_sensor.test_on and binary_sensor.test_off. You would display them (or at least one of them) in your entities card instead of the switch itself. Basically the binary sensor will just show the state of the switch without providing a means to change the switch’s state (i.e., just an indicator, not a toggle.)
@pnbruckner i think i did something wrong… so i change the code to work it for 2 hot water tanks but its working in reverse im guessing i messed it up… and i wish the people that write home assistant had videos for Dummies… like those books Dos For Dummies, Windows For Dummies, the yellow books… wish there was one for home asssitant so i could understand it… as im a visual learner not a words learner with my dislexia and learning disability… but something is reversed… and i found the 2 binary sensors i found you have to put the one thats off in there when the switch is off… as you can reverse it
but here the states are reversed… what did i do wrong??
######################
### Binary Sensors ###
######################
binary_sensor:
# Need to make a template to be able to change a Toggle Switch To On Of
# need to also change device class to something else to display other then ON OFF
# this is for when you dont have a binary sensor and you need to convert
# a Tplink Light Switch
# Template is nothing visual it just something you need to get entities
- platform: template
sensors:
#Building Hot Water Tank
b_hot_water_tank_on:
friendly_name: "ON"
#device_class: light
value_template: "{{ is_state('switch.h_hot_water_tank_switch', 'on') }}"
b_hot_water_tank_off:
friendly_name: "OFF"
#device_class: light
value_template: "{{ is_state('switch.h_hot_water_tank_switch', 'off') }}"
# House Hot Water Tank
h_hot_water_tank_on:
friendly_name: "ON"
#device_class: light
value_template: "{{ is_state('switch.h_hot_water_tank_switch', 'on') }}"
h_hot_water_tank_off:
friendly_name: "OFF"
#device_class: light
value_template: "{{ is_state('switch.h_hot_water_tank_switch', 'off') }}"
#reboot DSL modem
- platform: remote_rpi_gpio
host: 192.168.0.10
ports:
17: Reboot_DSL_Modem
Home Assistant is still very much in development. I’ve been using it for a few years now, and when I started there was very little configuration that was possible via the UI. Pretty much everything had to be done by directly editing the YAML files. It’s come a long way since then, and it’s still being improved every day, especially the UI, but it’s still not where they want it to be. Until it gets more stable it would be a lost of wasted effort trying to write “for dummies” books/tutorials/videos, since they would be obsolete before you knew it.
I can see you’ve defined two sets of binary sensors – b_... and h_..., but they both are based on the same switch (switch.h_hot_water_tank_switch.) Did you mean to do that?
Let’s take one example, specifically binary_sensor.h_hot_water_tank_on. The way it’s defined, it should follow switch.h_hot_water_tank_switch. If the switch is on, the binary sensor should be on. And if the switch is off, the binary sensor should be off.
Please use the STATES tab of the Developer Tools page to see them both to see if they do indeed follow.
so what i have is
H for House Water Tank
switch.h_hot_water_tank_switch
B for Buiding Hot Water Tank (my shop)
switch.b_hot_water_tank_switch
i have a 3rd hot water tank for my sisters house i have a connected vpn to her house to fix her computer so i added a button for that which i havent done yet i dunno if that will work yet… but not there yet
this way i cant turn off both hot water tanks only use them when i want to
i sent a pic above of the Develop states… here is the setting for B aka building.
its also reversed some reason? reason i was asking what did i do wrong?
ah i figured there be lot of people making the software
like unraid or freenas those server programs there is videos and documentations step by step… so thats why i figured there be some dummies books.
but ya i can see what you mean if they are making it as they go there isnt documantation… so really home assistant is really a Beta software its constantly being developped not really stable release or offical release then. right something like that?
but ya if the Enties card you can see i have House Hot water Tank and Building Hot Water Tank
there are both currently set to off on the switch…
and i chose the binary_sensor.xxxxxx_off for both of them to equal off as they are right now show off
and the state shows off… just its reporting backwards
and i appreciate the more explanation… im just still learning it… i just learned about Raspberry Pi in 2020 before that i never even heard of a raspberry pi except what to eat … so even though i in my 40s i just learning as i go… wish i knew this stuff years ago… i wouldnt get frustrated now lol
i also fixed my seperations… for me it makes sense but for other s it doesnt… part of my dislexia and learning disability
######################
### Binary Sensors ###
######################
binary_sensor:
# Need to make a template to be able to change a Toggle Switch To On Of
# need to also change device class to something else to display other then ON OFF
# this is for when you dont have a binary sensor and you need to convert
# a Tplink Light Switch
# Template is nothing visual it just something you need to get entities
- platform: template
sensors:
###############################
### Building Hot Water Tank ###
###############################
b_hot_water_tank_on:
friendly_name: "ON"
#device_class: light
value_template: "{{ is_state('switch.h_hot_water_tank_switch', 'on') }}"
b_hot_water_tank_off:
friendly_name: "OFF"
#device_class: light
value_template: "{{ is_state('switch.h_hot_water_tank_switch', 'off') }}"
############################
### House Hot Water Tank ###
############################
h_hot_water_tank_on:
friendly_name: "ON"
#device_class: light
value_template: "{{ is_state('switch.h_hot_water_tank_switch', 'on') }}"
h_hot_water_tank_off:
friendly_name: "OFF"
#device_class: light
value_template: "{{ is_state('switch.h_hot_water_tank_switch', 'off') }}"