Hi @keithh666
here is the code for mqtt and switch and the errors i got are below the code.
mqtt:
broker:192.168.18.140
port:1883
client_id:homeassistant-1
keepalive:60
switch:
- platform:mqtt
name:"Light"
command_topic:"ledtoggle"
payload_on:"a"
payload_off:"b"
qos:0
and the errors i got are the following:
Configuration invalid.CHECK CONFIG
Testing configuration at /home/pi/.homeassistant
17-03-05 22:41:58 WARNING (MainThread) [homeassistant.config] Incomplete core config. Auto detected latitude: 11.1111, longitude: 45.3333, elevation: 216
17-03-05 22:41:59 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [mqtt]: expected a dictionary for dictionary value @ data[âmqttâ]. Got âbroker:192.168.18.140 port:1883 client_id:homeassistant-1 keepalive:60â. (See ?, line ?). Please check the docs at https://home-assistant.io/components/mqtt/
17-03-05 22:41:59 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [switch]: expected a dictionary. Got OrderedDict([(âhomeassistantâ, OrderedDict([(ânameâ, âHomeâ), (âunit_systemâ, âmetricâ), (âtime_zoneâ, âssssss/ssdâ)])), (âfrontendâ, {}), (âconfigâ, {}), (âhttpâ, OrderedDict([(âapi_passwordâ, âmypasswordâ)])), (âupdaterâ, {}), (âconversationâ, {}), (âhistoryâ, {}), (âlogbookâ, {}), (âsunâ, {}), (âsensorâ, OrderedDict([(âplatformâ, âyrâ)])), (âttsâ, OrderedDict([(âplatformâ, âgoogleâ)])), (âmqttâ, âbroker:192.168.18.140 port:1883 client_id:homeassistant-1 keepalive:60â), (âswitchâ, ['platfo⌠(See /home/pi/.homeassistant/configuration.yaml, line 69). Please check the docs at https://home-assistant.io/components/switch/
Failed config
mqtt:
b
r
o
k
e
r
:
1
9
2
.
1
6
8
.
1
8
.
1
4
0
p
o
r
t
:
1
8
8
3
c
l
i
e
n
t
_
i
d
:
h
o
m
e
a
s
s
i
s
t
a
n
t
-
1
k
e
e
p
a
l
i
v
e
:
6
0
switch:
- platform:mqtt name:Light command_topic:âledtoggleâ payload_on:âaâ payload_off:âbâ qos:0
Successful config (partial)
mqtt:
switch:This text will be hidden