33cab10cef
Syncs project memory, custom agents, and commands across machines. Excludes secrets (settings.json), session state, and runtime files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
name, description, type
| name | description | type |
|---|---|---|
| HA automation management patterns | How to create/update HA automations via REST/WS API, scene save/restore, categories, and established patterns | reference |
Automation configs are updated via POST (not PUT):
POST http://192.168.86.36:8123/api/config/automation/config/<numeric_id>
Key patterns established:
- Notifications:
notify.mobile_app_pixel_10_pro_foldwith"image"for snapshots and"clickAction"for deep links - TTS:
tts.speaktargetingtts.home_assistant_cloudwithmedia_player_entity_id(not deprecatedtts.google_translate_say) - Sun azimuth:
sun.sunattributeazimuthfor directional triggers (west door = 225-315°, east windows = 45-135°). East shades have NO temp condition; front door shade still requires >80°F. - Weather conditions:
sensor.openweathermap_conditionstates: sunny, clear-night, partlycloudy, cloudy, rainy, pouring, snowy, fog, lightning, lightning-rainy - Scene save/restore:
scene.createwithsnapshot_entitiesto save state,scene.turn_onto restore. Used for Theater Mode and Climate thermostat save/restore. - Enabling/disabling automations: WebSocket API
config/entity_registry/updatewithdisabled_by: nullto enable,disabled_by: userto disable - Categories: WebSocket
config/category_registry/create(scope: automation) andconfig/entity_registry/updatewithcategories: {automation: cat_id}
Automation categories (scope: automation):
- Sprinklers, Shades & Blinds, Cameras & Security, Home Theater, Lights, 3D Printers, Garage, Fans, Climate, Routines, Severe Weather
Gotchas:
- Don't trigger Theater Mode on TV power — TV turns on for non-movie use. Only trigger via
input_boolean.theater_modetoggle. - Battery-powered Zigbee devices (locks) sleep aggressively — service calls that need a response (code queries) will timeout. Lock/unlock works because Z2M queues commands.
- Always use
backup: truewhen callingupdate.installon add-ons. - Wind gust entity is
sensor.openweathermap_wind_gust(NOT_wind_gust_speed). weather.get_forecastsrequires?return_responsewhen called via REST API. Response is atd['service_response']['weather.openweathermap']['forecast'].- Template references to NWS alerts must handle empty alerts list: use
| first | default({})pattern, not[0].
How to apply: Reference these patterns when creating or modifying HA automations.