Serac v1.8.0 - Vigilance Automation Features
🎯 Serac v1.8.0 - Vigilance Automation Features
What's New
This release adds binary sensors, a manual update service, and enhanced attributes to make creating weather alert automations incredibly easy. Perfect for mobile notifications, TTS announcements, and conditional logic!
🎯 Binary Sensors for Automation Triggers
Three new binary sensors that make automation creation trivial:
1. binary_sensor.serac_{prefix}_has_active_alert
- State: ON when ANY alert is above green (yellow, orange, or red)
- Use case: "Notify me of any weather alert"
- Attributes: List of active alerts with phenomenon, level, color
2. binary_sensor.serac_{prefix}_has_orange_alert
- State: ON when orange or red alerts are present
- Use case: "Notify me of dangerous conditions"
- Attributes: List of orange/red alerts only
3. binary_sensor.serac_{prefix}_has_red_alert
- State: ON when red alerts are present
- Use case: "Emergency notifications only"
- Attributes: List of red alerts only
All binary sensors include:
active_alerts: Detailed list of alerts (phenomenon, name, level, color)alert_count: Number of active alertsdepartment: French department codedepartment_name: Department nameoverall_level: Overall alert level (1-4)overall_color: Overall color (green/yellow/orange/red)
🔄 Manual Update Service
New service: serac.update_vigilance
- Force immediate refresh of vigilance data
- Works across all Serac instances
- Useful for testing and on-demand updates
- Available in Developer Tools → Services
Usage:
service: serac.update_vigilance📊 Enhanced Sensor Attributes
All vigilance sensors now include rich automation-friendly attributes:
active_alerts: Array of active (non-green) alerts with full detailsalert_count: Count of active alerts (0-9)highest_level: Highest alert level currently active (1-4)
These work great with templates and conditional logic!
🤖 Automation Examples
Example 1: Mobile Notification on Any Alert
automation:
- alias: "Weather Alert Notification"
trigger:
- platform: state
entity_id: binary_sensor.serac_home_has_active_alert
to: "on"
action:
- service: notify.mobile_app_iphone
data:
title: "⚠️ Weather Alert"
message: >
{{ state_attr('binary_sensor.serac_home_has_active_alert', 'alert_count') }}
alert(s): {{ states('sensor.serac_home_vigilance_summary') }}Example 2: TTS Announcement for Dangerous Alerts
automation:
- alias: "Dangerous Weather Alert TTS"
trigger:
- platform: state
entity_id: binary_sensor.serac_home_has_orange_alert
to: "on"
action:
- service: tts.google_translate_say
entity_id: media_player.home
data:
message: >
Attention! Weather alert:
{{ states('sensor.serac_home_vigilance_summary') }}Example 3: Flash Lights on Red Alert
automation:
- alias: "Red Alert Flash Lights"
trigger:
- platform: state
entity_id: binary_sensor.serac_home_has_red_alert
to: "on"
action:
- service: light.turn_on
target:
entity_id: light.all_lights
data:
flash: "long"
rgb_color: [255, 0, 0]
- service: notify.mobile_app_iphone
data:
title: "🚨 RED ALERT"
message: "Extreme weather conditions detected!"Example 4: Conditional Card Display
type: conditional
conditions:
- entity: binary_sensor.serac_home_has_active_alert
state: "on"
card:
type: markdown
content: |
## ⚠️ Weather Alerts
{{ states('sensor.serac_home_vigilance_summary') }}
**Active Alerts:** {{ state_attr('binary_sensor.serac_home_has_active_alert', 'alert_count') }}Technical Details
New Files
custom_components/serac/binary_sensor.py- Binary sensor platform implementationcustom_components/serac/services.yaml- Service documentation
Modified Files
custom_components/serac/__init__.py- Added binary sensor platform registration and service handlercustom_components/serac/sensor.py- Enhanced vigilance sensor attributescustom_components/serac/manifest.json- Version bump to 1.8.0
Architecture
- Binary sensors use the same
VigilanceCoordinatoras vigilance sensors - No additional API calls required
- Automatic entity ID sanitization (same as v1.7.1)
- Binary sensors follow Home Assistant best practices (device class:
safety)
Upgrade Instructions
For HACS Users
- Go to HACS → Integrations
- Find "Serac" and click "Update"
- Restart Home Assistant
- New binary sensors will appear automatically
What You'll See After Update
New entities per location:
binary_sensor.serac_{prefix}_has_active_alertbinary_sensor.serac_{prefix}_has_orange_alertbinary_sensor.serac_{prefix}_has_red_alert
New service:
serac.update_vigilance(in Developer Tools → Services)
Enhanced attributes on existing sensors:
- All vigilance sensors now have
active_alerts,alert_count,highest_level
Full Changelog
v1.8.0:
- 🎯 Added 3 binary sensors for automation triggers
- 🔄 Added
serac.update_vigilanceservice for manual refresh - 📊 Enhanced sensor attributes (active_alerts, alert_count, highest_level)
- 🤖 Perfect for mobile notifications and TTS automations
- 🔧 Binary sensors include detailed alert information
Links
- Repository: https://github.com/atacamalabs/ha-serac
- Issues: https://github.com/atacamalabs/ha-serac/issues
- Documentation: See README.md for full integration documentation
🎨 Generated with Claude Code