automation: - alias: "Notification Automation" id: notification_template description: "Send notifications based on events or conditions" trigger: - trigger: state entity_id: binary_sensor.REPLACE_WITH_SENSOR to: "on" condition: # Optional: Only notify during specific times - condition: time after: "08:00:00" before: "22:00:00" action: - action: notify.notify # Default notification service data: message: > {{ trigger.to_state.attributes.friendly_name }} is now {{ trigger.to_state.state }} at {{ now().strftime('%H:%M:%S') }} title: "Home Assistant Alert" # Optional: Send to specific mobile device # - action: notify.mobile_app_REPLACE_WITH_DEVICE_NAME # data: # message: "Custom notification message" # title: "Alert" # data: # # Optional: Add action buttons # actions: # - action: "ACTION_NAME" # title: "Action Button"