Hey guys - so I just tried creating my first switch template and its a good ol’ bowl o’ fail. I am using the ISY994 component to import an iolinc (integrated binary sensor and on/off switch) to control my garage door. According to the HA frontend template editor, I am getting true/false from the sensor; however when I start HASS, I get the following:
17-03-03 04:36:55 ERROR (MainThread) [homeassistant.components.switch.template] Received invalid switch is_on state: none. Expected: on, off, true, false
My switch config is in separate file from my configuration.yaml switch: !include conf/switches.yaml
After reading some forum posts, I am no further along. Many posts show a different way to query the status of the binary sensor using the states.binary_senor notation, but that didnt help
Yea, that must have been some mess up in my copy and paste… because you are right, but my actual config does have the spacing correct… on that note, I hate YAML…
Ahhh… yes, that explains it… ok so dumb question, if the entity doesnt exist when HASS first starts, does it check again at some point? If so, when? I ask because I’m not sure how to handle this. The thread you pointed to says to add some conditions, but I think that just avoids the error - not ensuring the switch is properly created…
So when HASS restarts, until the state changes, it doesnt know the state? Even if it pulled it from the SQLite db, it could be no longer valid… That would suck…
And,sorry - what do you mean it would work best if I used a related entity_ID?