You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I have a motion sensor from xiaomi and a gateway xiaomi 2, the firmware is original. My motion sensors are switched to service mode and they record movement every 5 seconds. I did as you wrote on the forum. The status of the motion sensor is reset after any period of time, even after 5 seconds. But if you walk in front of the motion sensor again, the detected status is not displayed, you need to wait 2 minutes and then it will show the detected status and after 5 seconds (I specified this time) it will reset the detected status to not detected. You can somehow get the home assistant to respond accurately to movement? There is a movement status detected after 5 seconds of no movement - status is not found, then create movement and status must be detected.
All set state does is change the attribute values of the specified entity. With non-existent entities, home assistant will create a generic one the will temporarily hold the values, a restart will erase them since the entity never really existed. With entities provided by integrations, the attributes can be changed, but ultimately the integration controls their values and can reset them whenever it decides to. There is no reliable way to use this to override an existing entity.
Hi. I have a motion sensor from xiaomi and a gateway xiaomi 2, the firmware is original. My motion sensors are switched to service mode and they record movement every 5 seconds. I did as you wrote on the forum. The status of the motion sensor is reset after any period of time, even after 5 seconds. But if you walk in front of the motion sensor again, the detected status is not displayed, you need to wait 2 minutes and then it will show the detected status and after 5 seconds (I specified this time) it will reset the detected status to not detected. You can somehow get the home assistant to respond accurately to movement? There is a movement status detected after 5 seconds of no movement - status is not found, then create movement and status must be detected.
I have installed Home Assistant 2020.12.1
Read it here https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/2
In configuration.yaml added python_script:
Created the python_scripts folder
Created a file set_state.py
I inserted your code into it
The service is available in the developer panel
Created automation
alias: DD in the corridor deactivating the status
description: We check the operation of the creak to deactivate the motion sensor
trigger:
platform: device
device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
entity_id: binary_sensor.motion_sensor_xxxxxxxxxxxxxxxx
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 5
condition: []
action:
entity_id: binary_sensor.motion_sensor_xxxxxxxxxxxxxxxxxxx
state: 'off'
service: python_script.set_state
mode: single
The text was updated successfully, but these errors were encountered: