Help with WeMo Maker sensor state

192 views
Skip to first unread message

Keith Watson

unread,
Jan 23, 2016, 4:59:17 PM1/23/16
to home-assi...@googlegroups.com
Hello,

I have been trying to get HA working with my WeMo Maker. I have it connected to my garage door with the switch in momentary and the sensor connected to a magnetic reed switch.

I can trigger the switch just fine. What I cannot figure out is how to set a condition based on the state of the sensor. So far I have determined that I need to somehow access the state attributes of the switch but for the life of me I cannot figure out how.

My latest attempt is this:

condition:
- platform: template
value_template: '{{ state.attributes.sensor_state == "off" }}'

But I get a message in the error log that there is no such attribute 'state'

Can anyone point me in the right direction?

Regards,

Keith Watson
813-760-1381
tkwat...@gmail.com
Twitter: @TKeithWatson

Paulus Schoutsen

unread,
Jan 23, 2016, 5:18:27 PM1/23/16
to home-assi...@googlegroups.com
It should be states.switch.your_name.attributes.sensor_state



--
You received this message because you are subscribed to the Google Groups "Home Assistant Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to home-assistant-...@googlegroups.com.
To post to this group, send email to home-assi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/home-assistant-dev/58C67526-8058-489D-B6BD-1B838D4C536F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
It's nice to be important but it's more important to be nice.

Keith Watson

unread,
Jan 23, 2016, 8:55:51 PM1/23/16
to Home Assistant Dev
Paul,

Thank you! I had tried that solution minus the "s" in "states". Figures that one letter would cause me hours of frustration.

Keith


On Saturday, January 23, 2016 at 5:18:27 PM UTC-5, Paulus Schoutsen wrote:
It should be states.switch.your_name.attributes.sensor_state

On Sat, Jan 23, 2016 at 1:59 PM, Keith Watson <tkwat...@gmail.com> wrote:
Hello,

I have been trying to get HA working with my WeMo Maker. I have it connected to my garage door with the switch in momentary and the sensor connected to a magnetic reed switch.

I can trigger the switch just fine. What I cannot figure out is how to set a condition based on the state of the sensor. So far I have determined that I need to somehow access the state attributes of the switch but for the life of me I cannot figure out how.

My latest attempt is this:

  condition:
   - platform: template
     value_template: '{{ state.attributes.sensor_state == "off" }}'

But I get a message in the error log that there is no such attribute 'state'

Can anyone point me in the right direction?

Regards,

Keith Watson
813-760-1381
tkwat...@gmail.com
Twitter: @TKeithWatson

--
You received this message because you are subscribed to the Google Groups "Home Assistant Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to home-assistant-dev+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages