1
0

automations.yaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. - id: '1634297777634'
  2. alias: bath lights off
  3. description: ''
  4. trigger:
  5. - device_id: b8318016a07e5732cd9025db3a2f8d20
  6. domain: zha
  7. platform: device
  8. type: remote_button_short_press
  9. subtype: button_1
  10. condition: []
  11. action:
  12. - service: light.turn_off
  13. target:
  14. entity_id: light.vanity
  15. data: {}
  16. mode: single
  17. - id: '1661139399908'
  18. alias: Person Detected - Back Yard - Motion Light
  19. description: ''
  20. triggers:
  21. - topic: agent/cameras/21/object_detection/person/detected
  22. trigger: mqtt
  23. - type: motion
  24. device_id: aba6aa12b89879750ec6be2ca75e1895
  25. entity_id: da73ba8d51fd5efc51fc74d20ec97208
  26. domain: binary_sensor
  27. trigger: device
  28. for:
  29. hours: 0
  30. minutes: 0
  31. seconds: 3
  32. conditions:
  33. - condition: sun
  34. before: sunrise
  35. after: sunset
  36. actions:
  37. - target:
  38. entity_id: scene.backyard_alert
  39. metadata: {}
  40. action: scene.turn_on
  41. data: {}
  42. - delay:
  43. hours: 0
  44. minutes: 1
  45. seconds: 0
  46. milliseconds: 0
  47. - target:
  48. entity_id: scene.backyard_normal
  49. metadata: {}
  50. action: scene.turn_on
  51. data: {}
  52. mode: restart
  53. - id: '1661386100452'
  54. alias: at dusk
  55. description: ''
  56. triggers:
  57. - event: sunset
  58. trigger: sun
  59. conditions: []
  60. actions:
  61. - action: cover.close_cover
  62. data: {}
  63. target:
  64. device_id: 6d7f031d733c0c054052b36ccd703264
  65. - action: scene.turn_on
  66. target:
  67. entity_id: scene.nighttime_normal
  68. - action: switch.turn_on
  69. metadata: {}
  70. target:
  71. entity_id:
  72. - switch.tz3000_okaz9tjs_ts011f
  73. - switch.ewelink_sa_003_zigbee
  74. - switch.noah_s_room_candle
  75. - switch.office_heater_switch
  76. - switch.ewelink_sa_003_zigbee_switch
  77. data: {}
  78. mode: single
  79. - id: '1662697063215'
  80. alias: at dawn
  81. description: ''
  82. triggers:
  83. - event: sunrise
  84. offset: 0
  85. trigger: sun
  86. conditions: []
  87. actions:
  88. - action: cover.open_cover
  89. target:
  90. entity_id: cover.front_room_blinds
  91. metadata: {}
  92. data: {}
  93. - action: scene.turn_on
  94. target:
  95. entity_id: scene.daytime_normal
  96. metadata: {}
  97. data: {}
  98. - action: automation.turn_on
  99. target:
  100. entity_id:
  101. - automation.backyard_motion_light_2
  102. - automation.front_yard_person_detected
  103. metadata: {}
  104. data: {}
  105. mode: single
  106. - id: '1672727297478'
  107. alias: bath lights on
  108. description: ''
  109. trigger:
  110. - device_id: b8318016a07e5732cd9025db3a2f8d20
  111. domain: zha
  112. platform: device
  113. type: remote_button_short_press
  114. subtype: button_4
  115. condition: []
  116. action:
  117. - service: light.turn_on
  118. target:
  119. entity_id: light.vanity
  120. data:
  121. kelvin: 4000
  122. brightness_pct: 25
  123. mode: single
  124. - id: '1672727402473'
  125. alias: bath lights brighter
  126. description: ''
  127. trigger:
  128. - device_id: b8318016a07e5732cd9025db3a2f8d20
  129. domain: zha
  130. platform: device
  131. type: remote_button_short_press
  132. subtype: button_3
  133. condition: []
  134. action:
  135. - service: light.turn_on
  136. data:
  137. brightness_step_pct: 5
  138. target:
  139. entity_id: light.vanity
  140. mode: single
  141. - id: '1672727480201'
  142. alias: bath lights dimmer
  143. description: ''
  144. trigger:
  145. - device_id: b8318016a07e5732cd9025db3a2f8d20
  146. domain: zha
  147. platform: device
  148. type: remote_button_short_press
  149. subtype: button_2
  150. condition: []
  151. action:
  152. - service: light.turn_on
  153. target:
  154. entity_id: light.vanity
  155. data:
  156. brightness_step_pct: -5
  157. mode: single
  158. - id: '1672727534313'
  159. alias: bath lights plum
  160. description: ''
  161. trigger:
  162. - device_id: b8318016a07e5732cd9025db3a2f8d20
  163. domain: zha
  164. platform: device
  165. type: remote_button_double_press
  166. subtype: button_3
  167. condition: []
  168. action:
  169. - service: light.turn_on
  170. data:
  171. brightness_pct: 50
  172. color_name: plum
  173. target:
  174. entity_id: light.vanity
  175. - service: light.turn_on
  176. target:
  177. entity_id: light.vanity
  178. data:
  179. color_name: plum
  180. mode: single
  181. - id: '1672727589488'
  182. alias: bath lights warm white
  183. description: ''
  184. trigger:
  185. - device_id: b8318016a07e5732cd9025db3a2f8d20
  186. domain: zha
  187. platform: device
  188. type: remote_button_double_press
  189. subtype: button_4
  190. condition: []
  191. action:
  192. - service: light.turn_on
  193. data:
  194. kelvin: 2700
  195. target:
  196. entity_id: light.vanity
  197. mode: single
  198. - id: '1683350354655'
  199. alias: Person Detected - Front Yard - Motion Light
  200. description: ''
  201. triggers:
  202. - topic: agent/cameras/20/object_detection/person/detected
  203. trigger: mqtt
  204. - type: motion
  205. device_id: 5b18788902b18f38a64cbe2787aa0343
  206. entity_id: 9c7d8c6b12d88643d757c3191adbcf42
  207. domain: binary_sensor
  208. trigger: device
  209. for:
  210. hours: 0
  211. minutes: 0
  212. seconds: 2
  213. conditions:
  214. - condition: sun
  215. after: sunset
  216. before: sunrise
  217. actions:
  218. - target:
  219. entity_id: scene.front_yard_alert
  220. metadata: {}
  221. action: scene.turn_on
  222. data: {}
  223. - delay:
  224. hours: 0
  225. minutes: 1
  226. seconds: 0
  227. milliseconds: 0
  228. - target:
  229. entity_id: scene.front_yard_normal
  230. metadata: {}
  231. action: scene.turn_on
  232. data: {}
  233. mode: restart
  234. - id: '1683497943655'
  235. alias: Person Detected - Back Yard - Notify (Image)
  236. description: ''
  237. triggers:
  238. - topic: agent/camera/10/object_detection/person/detected
  239. trigger: mqtt
  240. conditions: []
  241. actions:
  242. - action: notify.adris_mobile_devices
  243. data:
  244. title: Person detected in Back Yard
  245. message:
  246. data:
  247. tag:
  248. group:
  249. image: '{{ trigger.payload }}'
  250. url: /lovelace-main/cameras
  251. clickAction: /lovelace-main/cameras
  252. push:
  253. interruption-level: active
  254. - delay:
  255. hours: 0
  256. minutes: 1
  257. seconds: 0
  258. milliseconds: 0
  259. mode: single
  260. max_exceeded: silent
  261. - id: '1683498157728'
  262. alias: Person Detected - Front Yard - Notify (image)
  263. description: ''
  264. trigger:
  265. - platform: mqtt
  266. topic: agent/camera/full_frontal/object_detection/person/detected/image
  267. condition: []
  268. action:
  269. - service: notify.adris_mobile_devices
  270. data_template:
  271. message: '{{ trigger.payload }}'
  272. title: Person detected in Front Yard
  273. - delay:
  274. hours: 0
  275. minutes: 1
  276. seconds: 0
  277. milliseconds: 0
  278. mode: single
  279. max_exceeded: silent
  280. - id: '1701926625524'
  281. alias: Office Heater - Turn Off
  282. description: ''
  283. triggers:
  284. - entity_id:
  285. - binary_sensor.office_occupancy
  286. to: 'off'
  287. for:
  288. hours: 0
  289. minutes: 10
  290. seconds: 0
  291. trigger: state
  292. conditions:
  293. - condition: device
  294. type: is_on
  295. device_id: 67f15e6edfde039737a4c9d6a6681f67
  296. entity_id: e9d081ac50cea2f44e46db5da9d5bd8c
  297. domain: switch
  298. actions:
  299. - type: turn_off
  300. device_id: 67f15e6edfde039737a4c9d6a6681f67
  301. entity_id: e9d081ac50cea2f44e46db5da9d5bd8c
  302. domain: switch
  303. mode: restart
  304. - id: '1708275177795'
  305. alias: Person Detected - Back Yard - Notify
  306. description: ''
  307. triggers:
  308. - topic: agent/cameras/21/object_detection/person/detected
  309. trigger: mqtt
  310. conditions:
  311. - condition: time
  312. after: '22:00:00'
  313. before: 06:00:00
  314. actions:
  315. - action: notify.adris_mobile_devices
  316. metadata: {}
  317. data:
  318. message: Person detected in Back Yard
  319. title: Outdoor Activity Detected
  320. data:
  321. channel: Outdoor Activity
  322. group: motion_detection
  323. - delay:
  324. hours: 0
  325. minutes: 10
  326. seconds: 0
  327. milliseconds: 0
  328. mode: single
  329. max_exceeded: silent
  330. - id: '1708275331842'
  331. alias: Person Detected - Front Yard - Notify
  332. description: ''
  333. triggers:
  334. - topic: agent/cameras/20/object_detection/person/detected
  335. trigger: mqtt
  336. conditions: []
  337. actions:
  338. - action: notify.adris_mobile_devices
  339. metadata: {}
  340. data:
  341. message: Person Detected in Front Yard
  342. title: Outdoor Activity Detected
  343. data:
  344. channel: Outdoor Activity
  345. group: motion_detection
  346. - delay:
  347. hours: 0
  348. minutes: 10
  349. seconds: 0
  350. milliseconds: 0
  351. mode: single
  352. max_exceeded: silent
  353. - id: '1710120520332'
  354. alias: Basement Stairs - Motion Light
  355. description: ''
  356. triggers:
  357. - type: motion
  358. device_id: 4f946caefed3387d7611bcdaad8a4601
  359. entity_id: a43e6926f703edc421dc61c69449b5b5
  360. domain: binary_sensor
  361. trigger: device
  362. conditions: []
  363. actions:
  364. - type: turn_on
  365. device_id: 13d8808d82e3b131cd8ed0e3b7e652ea
  366. entity_id: a20142c77d0b177ca8d1ec4d2571a1c6
  367. domain: switch
  368. - delay:
  369. hours: 0
  370. minutes: 1
  371. seconds: 30
  372. milliseconds: 0
  373. - type: turn_off
  374. device_id: 13d8808d82e3b131cd8ed0e3b7e652ea
  375. entity_id: a20142c77d0b177ca8d1ec4d2571a1c6
  376. domain: switch
  377. mode: restart
  378. - id: '1730746416843'
  379. alias: turn on lava lamp
  380. description: ''
  381. triggers:
  382. - trigger: time
  383. at: '18:00:00'
  384. - trigger: time
  385. at: 06:00:00
  386. conditions: []
  387. actions:
  388. - type: turn_on
  389. device_id: 46e88c318ca4eed8d822b5d6672cb062
  390. entity_id: 9fabadba6787fb8d2a7537dc7a88eee8
  391. domain: switch
  392. mode: single
  393. - id: '1730746460829'
  394. alias: turn off lava lamp
  395. description: ''
  396. triggers:
  397. - trigger: time
  398. at: 00:00:00
  399. - trigger: time
  400. at: '12:00:00'
  401. conditions: []
  402. actions:
  403. - type: turn_off
  404. device_id: 46e88c318ca4eed8d822b5d6672cb062
  405. entity_id: 9fabadba6787fb8d2a7537dc7a88eee8
  406. domain: switch
  407. mode: single
  408. - id: '1730746572961'
  409. alias: unlock back door when i get home
  410. description: ''
  411. triggers:
  412. - trigger: zone
  413. entity_id: person.adri
  414. zone: zone.home
  415. event: enter
  416. conditions:
  417. - condition: or
  418. conditions:
  419. - type: is_connected
  420. condition: device
  421. device_id: 2cad4531838a935840b191e841de22a5
  422. entity_id: 7bd37da07a3c87b55362252125575cc2
  423. domain: binary_sensor
  424. - type: is_connected
  425. condition: device
  426. device_id: 2015ea5be975e73630792119aa72b64f
  427. entity_id: 209f7eeeb316907723cde73d4e48b9c6
  428. domain: binary_sensor
  429. actions:
  430. - device_id: ef1e57e6a71e669f345a9ecfc90e4b2e
  431. domain: lock
  432. entity_id: 252bd657d098084010ac62dda1c9872c
  433. type: unlock
  434. mode: single
  435. - id: '1736825165283'
  436. alias: set Noah is home
  437. description: ''
  438. triggers:
  439. - trigger: state
  440. entity_id:
  441. - light.fan_bulb_1
  442. to:
  443. - 'on'
  444. for:
  445. hours: 0
  446. minutes: 5
  447. seconds: 0
  448. conditions: []
  449. actions:
  450. - action: input_boolean.turn_on
  451. metadata: {}
  452. data: {}
  453. target:
  454. entity_id: input_boolean.is_noah_home
  455. mode: single
  456. - id: '1736825774161'
  457. alias: 'set heat if Noah is home '
  458. description: ''
  459. triggers:
  460. - trigger: time
  461. at: 06:00:00
  462. conditions:
  463. - condition: state
  464. entity_id: input_boolean.is_noah_home
  465. state: 'on'
  466. - condition: numeric_state
  467. entity_id: sensor.kroc_temperature
  468. below: 55
  469. - condition: time
  470. weekday:
  471. - mon
  472. - tue
  473. - wed
  474. - thu
  475. - fri
  476. actions:
  477. - action: climate.set_temperature
  478. metadata: {}
  479. data:
  480. temperature: 70
  481. target:
  482. entity_id: climate.climate
  483. - action: input_boolean.turn_off
  484. metadata: {}
  485. data: {}
  486. target:
  487. entity_id: input_boolean.is_noah_home
  488. mode: single
  489. - id: '1744095081253'
  490. alias: orphne charge - turn off
  491. description: ''
  492. triggers:
  493. - trigger: numeric_state
  494. entity_id:
  495. - sensor.orphne_battery_level
  496. above: 80
  497. conditions: []
  498. actions: []
  499. mode: single
  500. - id: '1744095187512'
  501. alias: orphne charge - turn on
  502. description: ''
  503. triggers:
  504. - trigger: numeric_state
  505. entity_id:
  506. - sensor.orphne_battery_level
  507. below: 15
  508. conditions: []
  509. actions: []
  510. mode: single
  511. - id: '1746534818431'
  512. alias: orphne night vision on
  513. description: ''
  514. triggers:
  515. - trigger: numeric_state
  516. entity_id:
  517. - sensor.orphne_dgtlu_net_light_level
  518. for:
  519. hours: 0
  520. minutes: 0
  521. seconds: 20
  522. below: 20
  523. conditions: []
  524. actions:
  525. - type: turn_on
  526. device_id: 4d73e9574b718823101b86d47eb1eb87
  527. entity_id: 8652f6caa77452113a3df3867b7669ac
  528. domain: switch
  529. mode: single
  530. - id: '1746534881878'
  531. alias: orphne night vision off
  532. description: ''
  533. triggers:
  534. - trigger: numeric_state
  535. entity_id:
  536. - sensor.orphne_dgtlu_net_light_level
  537. for:
  538. hours: 0
  539. minutes: 0
  540. seconds: 20
  541. above: 25
  542. conditions: []
  543. actions:
  544. - type: turn_off
  545. device_id: 4d73e9574b718823101b86d47eb1eb87
  546. entity_id: 8652f6caa77452113a3df3867b7669ac
  547. domain: switch
  548. mode: single
  549. - id: '1759540804156'
  550. alias: turn off counter at 10
  551. description: ''
  552. triggers:
  553. - trigger: time
  554. at: '22:00:00'
  555. conditions: []
  556. actions:
  557. - type: turn_on
  558. device_id: af1e12dac03096dec4f1b1306e99a8bb
  559. entity_id: f51405dcd49542c081f87dcd2f476316
  560. domain: light
  561. brightness_pct: 30
  562. - type: turn_off
  563. device_id: b0409b346a20537144528e5f4d7920bf
  564. entity_id: d2bd9d1c836dbc563d9ccdf602fb82dd
  565. domain: light
  566. mode: single
  567. - id: '1765151847549'
  568. alias: After Santa
  569. description: ''
  570. triggers:
  571. - trigger: time
  572. at: 02:00:00
  573. conditions: []
  574. actions:
  575. - action: switch.turn_off
  576. metadata: {}
  577. target:
  578. entity_id:
  579. - switch.tz3000_okaz9tjs_ts011f
  580. - switch.ewelink_sa_003_zigbee_switch
  581. - switch.office_heater_switch
  582. - switch.ewelink_sa_003_zigbee
  583. - switch.noah_s_room_candle
  584. data: {}
  585. - action: cover.close_cover
  586. metadata: {}
  587. target:
  588. entity_id: cover.parlor_blinds
  589. data: {}
  590. - action: light.turn_on
  591. metadata: {}
  592. target:
  593. entity_id: light.parlor_sconces
  594. data:
  595. color_temp_kelvin: 2755
  596. brightness_pct: 1
  597. mode: single
  598. - id: '1767224629027'
  599. alias: Bedroom Cam Notification
  600. description: ''
  601. triggers:
  602. - trigger: mqtt
  603. options:
  604. topic: agent/cameras/10/object_detection/person/detected
  605. encoding: ''
  606. conditions: []
  607. actions:
  608. - variables:
  609. timestamp: '{{ now().strftime(''%Y%m%d_%H%M%S'') }}'
  610. image_file: '{{ trigger.payload_json.oid }}_{{ timestamp }}.jpg'
  611. recording: '{{ trigger.payload_json.file.split(''/'')[-1] }}'
  612. - action: shell_command.base64_to_image
  613. data:
  614. payload: '{{ trigger.payload_json.image }}'
  615. filename: /config/www/snapshots/{{ image_file }}
  616. - delay: 00:00:01
  617. - action: notify.adris_mobile_devices
  618. data:
  619. message: Person Detected in Bedroom
  620. title: Bedroom Activity Detected
  621. data:
  622. channel: Indoor Activity
  623. group: motion_detection
  624. image: https://hass.dgtlu.net/local/snapshots/{{ image_file }}
  625. clickAction: http://athena.dgtlu.net:8090/streamFile.cgi?oid={{ trigger.payload_json.oid
  626. }}&ot=2&fn={{ recording }}
  627. actions:
  628. - action: URI
  629. title: View Recording
  630. uri: http://athena.dgtlu.net:8090/streamFile.cgi?oid={{ trigger.payload_json.oid
  631. }}&ot=2&fn={{ recording }}
  632. - delay:
  633. hours: 0
  634. minutes: 0
  635. seconds: 40
  636. milliseconds: 0
  637. mode: single
  638. max_exceeded: silent
  639. - id: '1767242164550'
  640. alias: Cleanup Old Snapshots
  641. description: ''
  642. triggers:
  643. - trigger: time
  644. at: 03:00:00
  645. actions:
  646. - action: shell_command.cleanup_snapshots
  647. data: {}
  648. - id: '1767253364578'
  649. alias: Sync Assist Entities to Alexa
  650. description: ''
  651. triggers:
  652. - event_type: homeassistant_started
  653. trigger: event
  654. - event_type: sync_alexa_entities
  655. trigger: event
  656. - at: 03:00:00
  657. trigger: time
  658. actions:
  659. - delay: 10
  660. - action: shell_command.sync_to_alexa
  661. - delay: 5
  662. - action: persistent_notification.create
  663. data:
  664. message: Alexa sync complete. Say 'Alexa, discover devices'