Got it! thanks for confirming that!
Yes, but the latest trace you posted doesnât appear to be using the latest example I had suggested.
Odd, I had restarted HA and triggered the automation from my watch and now is working perfectly! Trace log attached below:
{
"trace": {
"last_step": "action/1/then/0",
"run_id": "b07ace0f70b66a3a89b03890cf7c493e",
"state": "stopped",
"script_execution": "finished",
"timestamp": {
"start": "2023-02-15T20:17:28.264827+00:00",
"finish": "2023-02-15T20:17:28.898123+00:00"
},
"domain": "automation",
"item_id": "1676394605387",
"trigger": "event 'ios.action_fired'",
"trace": {
"trigger/0": [
{
"path": "trigger/0",
"timestamp": "2023-02-15T20:17:28.264979+00:00",
"changed_variables": {
"this": {
"entity_id": "automation.setup_office_for_work",
"state": "on",
"attributes": {
"last_triggered": "2023-02-15T18:11:54.754347+00:00",
"mode": "single",
"current": 0,
"id": "1676394605387",
"friendly_name": "Setup Office for Work"
},
"last_changed": "2023-02-15T20:16:03.594611+00:00",
"last_updated": "2023-02-15T20:16:03.594611+00:00",
"context": {
"id": "01GSBBGJGAKYDYXWQ9H7WHVNAS",
"parent_id": null,
"user_id": null
}
},
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "event",
"event": {
"event_type": "ios.action_fired",
"data": {
"actionID": "WorkTime",
"actionName": "WorkTime",
"sourceDeviceID": "reyniers_iphone_",
"sourceDeviceName": "Reynierâs iPhone đ",
"sourceDevicePermanentID": "D87E62F8-E557-465E-BF78-C5889608E797",
"triggerSource": "watch"
},
"origin": "REMOTE",
"time_fired": "2023-02-15T20:17:28.262477+00:00",
"context": {
"id": "01GSBBK566HSHJSDYP0BVP92ZG",
"parent_id": null,
"user_id": "400ef95814c14c3c8864b3ccb9f8b4ab"
}
},
"description": "event 'ios.action_fired'"
}
}
}
],
"action/0": [
{
"path": "action/0",
"timestamp": "2023-02-15T20:17:28.268082+00:00",
"changed_variables": {
"context": {
"id": "01GSBBK568M6BXWDCE3Z3JDKV2",
"parent_id": "01GSBBK566HSHJSDYP0BVP92ZG",
"user_id": null
}
},
"result": {
"choice": "then"
}
}
],
"action/0/if": [
{
"path": "action/0/if",
"timestamp": "2023-02-15T20:17:28.268511+00:00",
"result": {
"result": true
}
}
],
"action/0/if/condition/0": [
{
"path": "action/0/if/condition/0",
"timestamp": "2023-02-15T20:17:28.268563+00:00",
"result": {
"result": true
}
}
],
"action/0/if/condition/0/entity_id/0": [
{
"path": "action/0/if/condition/0/entity_id/0",
"timestamp": "2023-02-15T20:17:28.268600+00:00",
"result": {
"result": true,
"state": "off",
"wanted_state": "off"
}
}
],
"action/0/if/condition/1": [
{
"path": "action/0/if/condition/1",
"timestamp": "2023-02-15T20:17:28.268720+00:00",
"result": {
"result": true
}
}
],
"action/0/if/condition/1/entity_id/0": [
{
"path": "action/0/if/condition/1/entity_id/0",
"timestamp": "2023-02-15T20:17:28.268766+00:00",
"result": {
"result": true,
"state": "off",
"wanted_state": "off"
}
}
],
"action/0/if/condition/2": [
{
"path": "action/0/if/condition/2",
"timestamp": "2023-02-15T20:17:28.268843+00:00",
"result": {
"result": true
}
}
],
"action/0/if/condition/2/entity_id/0": [
{
"path": "action/0/if/condition/2/entity_id/0",
"timestamp": "2023-02-15T20:17:28.268941+00:00",
"result": {
"result": true,
"state": 82
}
}
],
"action/0/then/0": [
{
"path": "action/0/then/0",
"timestamp": "2023-02-15T20:17:28.269562+00:00",
"result": {
"params": {
"domain": "fan",
"service": "turn_on",
"service_data": {
"percentage": 100,
"entity_id": [
"fan.office_fan"
]
},
"target": {
"entity_id": [
"fan.office_fan"
]
}
},
"running_script": false,
"limit": 10
}
}
],
"action/1": [
{
"path": "action/1",
"timestamp": "2023-02-15T20:17:28.789891+00:00",
"result": {
"choice": "then"
}
}
],
"action/1/if": [
{
"path": "action/1/if",
"timestamp": "2023-02-15T20:17:28.790111+00:00",
"result": {
"result": true
}
}
],
"action/1/if/condition/0": [
{
"path": "action/1/if/condition/0",
"timestamp": "2023-02-15T20:17:28.790140+00:00",
"result": {
"result": true
}
}
],
"action/1/if/condition/0/entity_id/0": [
{
"path": "action/1/if/condition/0/entity_id/0",
"timestamp": "2023-02-15T20:17:28.790156+00:00",
"result": {
"result": true,
"state": "off",
"wanted_state": "off"
}
}
],
"action/1/then/0": [
{
"path": "action/1/then/0",
"timestamp": "2023-02-15T20:17:28.790559+00:00",
"result": {
"params": {
"domain": "light",
"service": "turn_on",
"service_data": {},
"target": {
"entity_id": [
"light.office_light"
]
}
},
"running_script": false,
"limit": 10
}
}
]
},
"config": {
"id": "1676394605387",
"alias": "Setup Office for Work",
"description": "",
"trigger": [
{
"platform": "event",
"event_type": "ios.action_fired",
"event_data": {
"actionName": "WorkTime"
}
}
],
"condition": [],
"action": [
{
"if": [
{
"condition": "state",
"entity_id": "fan.office_fan",
"state": "off"
},
{
"condition": "state",
"entity_id": "climate.home",
"state": "off"
},
{
"condition": "numeric_state",
"entity_id": "weather.home",
"attribute": "temperature",
"above": 75
}
],
"then": [
{
"service": "fan.turn_on",
"data": {
"percentage": 100
},
"target": {
"entity_id": "fan.office_fan"
}
}
]
},
{
"if": [
{
"condition": "state",
"entity_id": "light.office_light",
"state": "off"
}
],
"then": [
{
"service": "light.turn_on",
"target": {
"entity_id": "light.office_light"
}
}
]
}
],
"mode": "single"
},
"blueprint_inputs": null,
"context": {
"id": "01GSBBK568M6BXWDCE3Z3JDKV2",
"parent_id": "01GSBBK566HSHJSDYP0BVP92ZG",
"user_id": null
}
},
"logbookEntries": [
{
"name": "Setup Office for Work",
"message": "triggered by event 'ios.action_fired'",
"source": "event 'ios.action_fired'",
"entity_id": "automation.setup_office_for_work",
"context_id": "01GSBBK568M6BXWDCE3Z3JDKV2",
"when": 1676492248.265092,
"domain": "automation"
},
{
"when": 1676492248.441081,
"state": "on",
"entity_id": "fan.office_fan",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "Setup Office for Work",
"context_message": "triggered by event 'ios.action_fired'",
"context_source": "event 'ios.action_fired'",
"context_entity_id": "automation.setup_office_for_work"
},
{
"when": 1676492249.023702,
"state": "on",
"entity_id": "light.office_light",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "Setup Office for Work",
"context_message": "triggered by event 'ios.action_fired'",
"context_source": "event 'ios.action_fired'",
"context_entity_id": "automation.setup_office_for_work"
},
{
"when": 1676492249.024505,
"state": "on",
"entity_id": "light.homelightsexceptkid",
"icon": "mdi:lightbulb-group",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "Setup Office for Work",
"context_message": "triggered by event 'ios.action_fired'",
"context_source": "event 'ios.action_fired'",
"context_entity_id": "automation.setup_office_for_work"
}
]
}
I have marked one of your replies as the solution since the only change I made was move some conditions over but your solution does exactly what I was looking for.