{"id":13337,"date":"2021-09-24T10:32:23","date_gmt":"2021-09-24T10:32:23","guid":{"rendered":"https:\/\/www.rjt.org.uk\/home\/?post_type=home_assistant_tip&#038;p=13337"},"modified":"2021-09-24T10:32:40","modified_gmt":"2021-09-24T10:32:40","slug":"detect-motion-on-any-motion-sensor","status":"publish","type":"home_assistant_tip","link":"https:\/\/www.rjt.org.uk\/home\/archives\/home-assistant-tip\/detect-motion-on-any-motion-sensor\/","title":{"rendered":"Detect Motion on any motion sensor"},"content":{"rendered":"\n<p>Will return true when any motion sensor is triggered.  This is used in our house in conjunction with a sleep time input boolean, to prevent room assistant turning on lights in other parts of the house when we leave a watch downstairs or RA decides we are in the office next to the bedroom if we move around the bedroom at night.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{{ states.binary_sensor | selectattr('state', 'eq', 'on') | selectattr('attributes.device_class', 'eq', 'motion')| list | count > 0}}<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"template":"","class_list":["post-13337","home_assistant_tip","type-home_assistant_tip","status-publish","hentry","comments-off"],"_links":{"self":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/home_assistant_tip\/13337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/home_assistant_tip"}],"about":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/types\/home_assistant_tip"}],"wp:attachment":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/media?parent=13337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}