{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/5271","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/5271/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/5271/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/5271/events","html_url":"https://github.com/home-assistant/home-assistant/issues/5271","id":200063662,"number":5271,"title":"Delay in light turning on using automation","user":{"login":"f0nt4","id":6190791,"avatar_url":"https://avatars3.githubusercontent.com/u/6190791?v=4","gravatar_id":"","url":"https://api.github.com/users/f0nt4","html_url":"https://github.com/f0nt4","followers_url":"https://api.github.com/users/f0nt4/followers","following_url":"https://api.github.com/users/f0nt4/following{/other_user}","gists_url":"https://api.github.com/users/f0nt4/gists{/gist_id}","starred_url":"https://api.github.com/users/f0nt4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f0nt4/subscriptions","organizations_url":"https://api.github.com/users/f0nt4/orgs","repos_url":"https://api.github.com/users/f0nt4/repos","events_url":"https://api.github.com/users/f0nt4/events{/privacy}","received_events_url":"https://api.github.com/users/f0nt4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2017-01-11T11:03:53Z","updated_at":"2017-12-05T21:42:55Z","closed_at":null,"author_association":"NONE","body":"**Home Assistant release (`hass --version`):**\r\n0.36.0.dev0 (But also in latest stable)\r\n\r\n**Python release (`python3 --version`):**\r\nPython 3.4.2\r\n\r\n**Component/platform:**\r\nswitch/light/rfxtrx\r\nremote and switch are KlikAanKlikUit (ClickOnClickOff) devices.\r\nrfxtrx module is this one: http://www.rfxcom.com/store/Transceivers/14103\r\n\r\n**Description of problem:**\r\nThere's a short delay after an automation is triggered to turn on a light which is a few seconds.\r\n\r\nWhen you activate the motion sensor (also could be a signal from a remote control), the corresponding switch and light turn on in the webinterface almost instantly,\r\nbut then after that in reality it takes another +/- 2 seconds for the lights to turn on.\r\nIf you turn the switch \"on\" in the webinterface yourself, the light does turn on instantly.\r\nThe size of the installation didn't seem to matter, I made a clean install with only 1 light, 1 switch and 1 automation and everything else disabled but was the same.\r\nI also tried different types of triggers and showing the motion sensor as a binary switch, but with no luck.\r\ncreating a binary_sensor out of the motionswitch, and attaching the trigger to this didn't help either.\r\n\r\nThe +/- 2 seconds doesn't seem long, but for me it's enough time to be at least at the half of the hallway.\r\n\r\n**Expected:**\r\nExpectation is that the light turn on immediatly, like pressing a button on the webinterface, after motion is detected.\r\n\r\n**Problem-relevant `configuration.yaml` entries and steps to reproduce:**\r\n```yaml\r\nswitch:\r\n  - platform: rfxtrx\r\n    automatic_add: False\r\n    devices:\r\n      0b110000014a655a0a000050:\r\n        name: Motion Hallway\r\n\r\nlight:\r\n  - platform: rfxtrx\r\n    devices:\r\n      0b11000423bc0cfe00010f70:\r\n        name: Hallway\r\n\r\nautomation:\r\n  alias: Turn on light hallway on movement\r\n  trigger:\r\n    platform: template\r\n    value_template: \"{{ is_state('switch.motion_hallway', 'on') }}\"\r\n  action:\r\n    service: light.turn_on\r\n    entity_id: light.hallway\r\n```\r\n\r\n1. Motion sensor get activated by motion and sends an \"on\" signal\".\r\n2. The rfxtrx module get this, and passes it to HA\r\n3. Motion sensor turns \"on\" in webinterface\r\n3. HA executes automation\r\n4. Light turns \"on\" in webinterface\r\n-- +/- 2 seconds delay --\r\n5. Light really turns on\r\nUntill step 5 everything seems to be pretty instant.\r\n\r\n**Traceback (if applicable):**\r\n```bash\r\nDEBUG:homeassistant.components.rfxtrx:Receive RFXCOM event from (Device_id: 14a655a10 Class: LightingDevice Sub: 0, Pkt_id: 0b110000014a655a0a010f50)\r\nDEBUG:homeassistant.components.rfxtrx:Device_id: 14a655a10 device_update. Command: On\r\nINFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=<state switch.motion_hallway=off; friendly_name=Motion Hallway, assumed_state=True, hidden=True @ 2017-01-11T11:58:35.980616+01:00>, entity_id=switch.motion_hallway, new_state=<state switch.motion_hallway=on; friendly_name=Motion Hallway, assumed_state=True, hidden=True @ 2017-01-11T11:59:24.353260+01:00>>\r\nDEBUG:homeassistant.components.websocket_api:WS 1860221072: Sending {'type': 'event', 'event': {'time_fired': datetime.datetime(2017, 1, 11, 10, 59, 24, 353536, tzinfo=<UTC>), 'origin': 'LOCAL', 'event_type': 'state_changed', 'data': {'old_state': <state switch.motion_hallway=off; friendly_name=Motion Hallway, assumed_state=True, hidden=True @ 2017-01-11T11:58:35.980616+01:00>, 'entity_id': 'switch.motion_hallway', 'new_state': <state switch.motion_hallway=on; friendly_name=Motion Hallway, assumed_state=True, hidden=True @ 2017-01-11T11:59:24.353260+01:00>}}, 'id': 2}\r\nINFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=<state binary_sensor.hallway_movement=off; friendly_name=hallway_movement, sensor_class=motion @ 2017-01-11T11:58:34.936308+01:00>, entity_id=binary_sensor.hallway_movement, new_state=<state binary_sensor.hallway_movement=on; friendly_name=hallway_movement, sensor_class=motion @ 2017-01-11T11:59:24.401141+01:00>>\r\nINFO:homeassistant.components.automation:Executing Turn on light hallway on movement\r\nINFO:homeassistant.core:Bus:Handling <Event logbook_entry[L]: domain=automation, message=has been triggered, name=Turn on light hallway on movement, entity_id=automation.turn_on_light_hallway_on_movement>\r\nINFO:homeassistant.helpers.script:Script Turn on light hallway on movement: Running script\r\nINFO:homeassistant.helpers.script:Script Turn on light hallway on movement: Executing step call service\r\nINFO:homeassistant.core:Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_call_id=1977334896-2, service_data=brightness=70, entity_id=['light.hallway']>\r\nDEBUG:homeassistant.components.websocket_api:WS 1860221072: Sending {'type': 'event', 'event': {'time_fired': datetime.datetime(2017, 1, 11, 10, 59, 24, 401378, tzinfo=<UTC>), 'origin': 'LOCAL', 'event_type': 'state_changed', 'data': {'old_state': <state binary_sensor.hallway_movement=off; friendly_name=hallway_movement, sensor_class=motion @ 2017-01-11T11:58:34.936308+01:00>, 'entity_id': 'binary_sensor.hallway_movement', 'new_state': <state binary_sensor.hallway_movement=on; friendly_name=hallway_movement, sensor_class=motion @ 2017-01-11T11:59:24.401141+01:00>}}, 'id': 2}\r\nINFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=<state group.automation_motion_sensors=off; friendly_name=Motion Sensors, order=30, entity_id=('binary_sensor.hallway_movement', 'binary_sensor.toilet_movement') @ 2017-01-11T11:58:54.430337+01:00>, entity_id=group.automation_motion_sensors, new_state=<state group.automation_motion_sensors=on; friendly_name=Motion Sensors, order=30, entity_id=('binary_sensor.hallway_movement', 'binary_sensor.toilet_movement') @ 2017-01-11T11:59:24.438459+01:00>>\r\nDEBUG:homeassistant.components.websocket_api:WS 1860221072: Sending {'type': 'event', 'event': {'time_fired': datetime.datetime(2017, 1, 11, 10, 59, 24, 438684, tzinfo=<UTC>), 'origin': 'LOCAL', 'event_type': 'state_changed', 'data': {'old_state': <state group.automation_motion_sensors=off; friendly_name=Motion Sensors, order=30, entity_id=('binary_sensor.hallway_movement', 'binary_sensor.toilet_movement') @ 2017-01-11T11:58:54.430337+01:00>, 'entity_id': 'group.automation_motion_sensors', 'new_state': <state group.automation_motion_sensors=on; friendly_name=Motion Sensors, order=30, entity_id=('binary_sensor.hallway_movement', 'binary_sensor.toilet_movement') @ 2017-01-11T11:59:24.438459+01:00>}}, 'id': 2}\r\nINFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=<state light.hallway=off; supported_features=1, friendly_name=Hallway, assumed_state=True @ 2017-01-11T11:58:34.589379+01:00>, entity_id=light.hallway, new_state=<state light.hallway=on; supported_features=1, friendly_name=Hallway, brightness=70, assumed_state=True @ 2017-01-11T11:59:24.461722+01:00>>\r\nDEBUG:homeassistant.components.websocket_api:WS 1860221072: Sending {'type': 'event', 'event': {'time_fired': datetime.datetime(2017, 1, 11, 10, 59, 24, 461928, tzinfo=<UTC>), 'origin': 'LOCAL', 'event_type': 'state_changed', 'data': {'old_state': <state light.hallway=off; supported_features=1, friendly_name=Hallway, assumed_state=True @ 2017-01-11T11:58:34.589379+01:00>, 'entity_id': 'light.hallway', 'new_state': <state light.hallway=on; supported_features=1, friendly_name=Hallway, brightness=70, assumed_state=True @ 2017-01-11T11:59:24.461722+01:00>}}, 'id': 2}\r\nINFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=<state group.all_lights=off; auto=True, entity_id=('light.hallway', 'light.big_livingroom', 'light.window', 'light.toilet', 'light.big_bedroom', 'light.door_side', 'light.floor_led', 'light.window_side', 'light.desk', 'light.door'), hidden=True, friendly_name=all lights, order=0, assumed_state=True @ 2017-01-11T11:58:34.594081+01:00>, entity_id=group.all_lights, new_state=<state group.all_lights=on; auto=True, entity_id=('light.hallway', 'light.big_livingroom', 'light.window', 'light.toilet', 'light.big_bedroom', 'light.door_side', 'light.floor_led', 'light.window_side', 'light.desk', 'light.door'), hidden=True, friendly_name=all lights, order=0, assumed_state=True @ 2017-01-11T11:59:24.478558+01:00>>\r\nINFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=<state group.hallway_lights=off; friendly_name=Hallway, order=11, entity_id=('light.hallway',), assumed_state=True @ 2017-01-11T11:58:54.370259+01:00>, entity_id=group.hallway_lights, new_state=<state group.hallway_lights=on; friendly_name=Hallway, order=11, entity_id=('light.hallway',), assumed_state=True @ 2017-01-11T11:59:24.483987+01:00>>\r\nDEBUG:homeassistant.components.websocket_api:WS 1860221072: Sending {'type': 'event', 'event': {'time_fired': datetime.datetime(2017, 1, 11, 10, 59, 24, 478706, tzinfo=<UTC>), 'origin': 'LOCAL', 'event_type': 'state_changed', 'data': {'old_state': <state group.all_lights=off; auto=True, entity_id=('light.hallway', 'light.big_livingroom', 'light.window', 'light.toilet', 'light.big_bedroom', 'light.door_side', 'light.floor_led', 'light.window_side', 'light.desk', 'light.door'), hidden=True, friendly_name=all lights, order=0, assumed_state=True @ 2017-01-11T11:58:34.594081+01:00>, 'entity_id': 'group.all_lights', 'new_state': <state group.all_lights=on; auto=True, entity_id=('light.hallway', 'light.big_livingroom', 'light.window', 'light.toilet', 'light.big_bedroom', 'light.door_side', 'light.floor_led', 'light.window_side', 'light.desk', 'light.door'), hidden=True, friendly_name=all lights, order=0, assumed_state=True @ 2017-01-11T11:59:24.478558+01:00>}}, 'id': 2}\r\nDEBUG:homeassistant.components.websocket_api:WS 1860221072: Sending {'type': 'event', 'event': {'time_fired': datetime.datetime(2017, 1, 11, 10, 59, 24, 484122, tzinfo=<UTC>), 'origin': 'LOCAL', 'event_type': 'state_changed', 'data': {'old_state': <state group.hallway_lights=off; friendly_name=Hallway, order=11, entity_id=('light.hallway',), assumed_state=True @ 2017-01-11T11:58:54.370259+01:00>, 'entity_id': 'group.hallway_lights', 'new_state': <state group.hallway_lights=on; friendly_name=Hallway, order=11, entity_id=('light.hallway',), assumed_state=True @ 2017-01-11T11:59:24.483987+01:00>}}, 'id': 2}\r\nINFO:homeassistant.core:Bus:Handling <Event service_executed[L]: service_call_id=1977334896-2>\r\nINFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=<state group.lights_view=off; hidden=True, entity_id=('group.living_room_lights', 'group.bedroom_lights', 'group.hallway_lights', 'group.toilet_lights'), icon=mdi:lightbulb, friendly_name=Lights, view=True, order=4, assumed_state=True @ 2017-01-11T11:58:54.481564+01:00>, entity_id=group.lights_view, new_state=<state group.lights_view=on; hidden=True, entity_id=('group.living_room_lights', 'group.bedroom_lights', 'group.hallway_lights', 'group.toilet_lights'), icon=mdi:lightbulb, friendly_name=Lights, view=True, order=4, assumed_state=True @ 2017-01-11T11:59:24.498697+01:00>>\r\nDEBUG:homeassistant.components.websocket_api:WS 1860221072: Sending {'type': 'event', 'event': {'time_fired': datetime.datetime(2017, 1, 11, 10, 59, 24, 498830, tzinfo=<UTC>), 'origin': 'LOCAL', 'event_type': 'state_changed', 'data': {'old_state': <state group.lights_view=off; hidden=True, entity_id=('group.living_room_lights', 'group.bedroom_lights', 'group.hallway_lights', 'group.toilet_lights'), icon=mdi:lightbulb, friendly_name=Lights, view=True, order=4, assumed_state=True @ 2017-01-11T11:58:54.481564+01:00>, 'entity_id': 'group.lights_view', 'new_state': <state group.lights_view=on; hidden=True, entity_id=('group.living_room_lights', 'group.bedroom_lights', 'group.hallway_lights', 'group.toilet_lights'), icon=mdi:lightbulb, friendly_name=Lights, view=True, order=4, assumed_state=True @ 2017-01-11T11:59:24.498697+01:00>}}, 'id': 2}\r\nINFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=<state automation.turn_on_light_hallway_on_movement=on; friendly_name=Turn on light hallway on movement, last_triggered=None @ 2017-01-11T11:58:54.784060+01:00>, entity_id=automation.turn_on_light_hallway_on_movement, new_state=<state automation.turn_on_light_hallway_on_movement=on; friendly_name=Turn on light hallway on movement, last_triggered=2017-01-11T11:59:24.508082+01:00 @ 2017-01-11T11:58:54.784060+01:00>>\r\nDEBUG:homeassistant.components.websocket_api:WS 1860221072: Sending {'type': 'event', 'event': {'time_fired': datetime.datetime(2017, 1, 11, 10, 59, 24, 508606, tzinfo=<UTC>), 'origin': 'LOCAL', 'event_type': 'state_changed', 'data': {'old_state': <state automation.turn_on_light_hallway_on_movement=on; friendly_name=Turn on light hallway on movement, last_triggered=None @ 2017-01-11T11:58:54.784060+01:00>, 'entity_id': 'automation.turn_on_light_hallway_on_movement', 'new_state': <state automation.turn_on_light_hallway_on_movement=on; friendly_name=Turn on light hallway on movement, last_triggered=2017-01-11T11:59:24.508082+01:00 @ 2017-01-11T11:58:54.784060+01:00>}}, 'id': 2}\r\n```\r\n\r\n**Additional info:**\r\nThread on the forum:\r\nhttps://community.home-assistant.io/t/slow-to-trigger-motion-via-wired-pir/8775\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/349451156","html_url":"https://github.com/home-assistant/home-assistant/issues/5271#issuecomment-349451156","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/5271","id":349451156,"user":{"login":"OWK2017","id":32390061,"avatar_url":"https://avatars0.githubusercontent.com/u/32390061?v=4","gravatar_id":"","url":"https://api.github.com/users/OWK2017","html_url":"https://github.com/OWK2017","followers_url":"https://api.github.com/users/OWK2017/followers","following_url":"https://api.github.com/users/OWK2017/following{/other_user}","gists_url":"https://api.github.com/users/OWK2017/gists{/gist_id}","starred_url":"https://api.github.com/users/OWK2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OWK2017/subscriptions","organizations_url":"https://api.github.com/users/OWK2017/orgs","repos_url":"https://api.github.com/users/OWK2017/repos","events_url":"https://api.github.com/users/OWK2017/events{/privacy}","received_events_url":"https://api.github.com/users/OWK2017/received_events","type":"User","site_admin":false},"created_at":"2017-12-05T21:42:55Z","updated_at":"2017-12-05T21:42:55Z","author_association":"NONE","body":"Hi Pascal\n\nYou already did a lot of work!\n\nYour effort is highly appreciated, because I’m stuck for now and not making progress migrating to  HA.\n\n\nKind regards\nOWK\n\nOp 5 dec. 2017 om 17:05 heeft Pascal Vizeli <notifications@github.com> het volgende geschreven:\n\nThat is a RFXTRX problem. This platform is written very bad and don't try to follow our internal guide lines. I work on a cleanup to fix this problems:\n#10501\n\n—\nYou are receiving this because you commented.\nReply to this email directly, view it on GitHub, or mute the thread.\n\n"}}
{"actor":{"display_login":"OWK2017"}}