Thanks so much for taking the time and for your patience i really appreciate it!
I have a simple one state 433Mhz pir sensor, I use the OpenMQTTGateway I can see the messages in MQTT broker.
The PIR sensor works fine the state is changing from on to off after 10 seconds like it should (I use an automation to change it from on to off after 10 seconds)
I see the light switch turn yellow in the HASS interface and that the automation was triggered
The light turns on without a problem from Alexa/manually/clicking the switch in HASS/clicking on the automation trigger
The conditions are not important because the same issue occurs when there are no conditions at all.
My configuration file is splitted
binary_sensor.yaml configuration:
- platform: mqtt
name: "Study room Motion Sensor"
qos: 0
state_topic: "home/433toMQTT"
payload_on: "2645158"
payload_off: "2645158off"
device_class: motion
My automations.yaml configuration:
- alias: 'Study room Motion Sensor Off Timer'
initial_state: 'on'
trigger:
platform: state
entity_id: binary_sensor.study_room_motion_sensor
to: 'on'
for:
seconds: 10
action:
service: mqtt.publish
data:
topic: 'home/433toMQTT'
payload: '2645158off'
retain: 'true'
- alias: Study room Motion Sensor Light ON
initial_state: 'on'
trigger:
platform: state
entity_id: binary_sensor.study_room_motion_sensor
to: 'on'
condition:
- condition: state
entity_id: group.g_shai_tracker
state: 'home'
- condition: state
entity_id: group.g_alina_tracker
state: 'home'
action:
service: switch.turn_on
entity_id: switch.study_room_light
You can see in the screenshots that the automation worked (for the interface at least) but the light didnāt turned on