You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 433f350
Browse filesBrowse the repository at this point in the historyBrowse files
Antonio ...
committed
feat: Centralized mobile notification system (v1.3.0)
This release introduces a comprehensive mobile notification system that sends push notifications to users' mobile devices for key events.
## New Features
### 📱 Mobile Notification System
- **MobileNotificationService**: Centralized service for sending mobile notifications
- **Configuration Step**: Added notifications step in onboarding wizard
- **Granular Control**: 3 switches to enable/disable notifications per feature:
- `evsc_notify_smart_blocker_enabled` - Smart Blocker notifications (default ON)
- `evsc_notify_priority_balancer_enabled` - Priority Balancer notifications (default ON)
- `evsc_notify_night_charge_enabled` - Night Charge notifications (default ON)
### 🔔 Notification Types
1. **Smart Blocker** - Charging interrupted outside window
- Emoji-rich Italian message with timestamp
- Includes blocking reason
2. **Priority Balancer** - Priority changes (EV ↔ Home ↔ EV_Free)
- Shows current and target SOC for both EV and Home battery
- Explains reason for priority change
3. **Night Smart Charge** - Charging started (battery/grid mode)
- Distinguishes between battery and grid mode
- Includes PV forecast and charging amperage
- Explains reason for mode selection
### 📋 Technical Details
- **Title**: All notifications use fixed title "BORGO"
- **Tags**: Grouped by feature (evsc_smart_blocker, evsc_priority_change, evsc_night_charge)
- **Priority Levels**: High for Smart Blocker, normal for others
- **Icon**: All use mdi:ev-station
- **Service Discovery**: Runtime discovery of mobile_app_* notify services
- **Backward Compatibility**: Graceful handling for existing installations without notification config
## Files Modified/Created
### NEW
- `utils/mobile_notification_service.py` (212 lines) - Centralized notification service
### MODIFIED
- `const.py` - Added CONF_NOTIFY_SERVICES and notification switch suffixes
- `config_flow.py` - Added step 5 (notifications) to both config and options flow
- `switch.py` - Added 3 notification control switches
- `strings.json` - Added Italian translations for notifications step
- `automations.py` - Integrated mobile notifications in Smart Blocker
- `priority_balancer.py` - Added priority change detection and notifications
- `night_smart_charge.py` - Added notifications when charging starts (battery/grid mode)
- `__init__.py` - Updated version to 1.3.0
- `manifest.json` - Updated version to 1.3.0
## Integration Architecture
- Config flow passes `CONF_NOTIFY_SERVICES` list to all components
- Each component initializes MobileNotificationService with notify services list
- Notifications respect enabled/disabled switches via entity registry lookup
- Default behavior: All notification switches ON for new installations
## Testing Recommendations
1. Complete onboarding with mobile device selection
2. Verify 3 notification switches created and enabled by default
3. Test Smart Blocker notification when charging blocked
4. Test Priority Balancer notification on priority changes
5. Test Night Charge notifications for both battery and grid modes
6. Verify notifications arrive on selected mobile devices
7. Test disabling individual notification switches
🚀 Generated with Claude Code
0 commit comments