SMS Notifications via SMS.to — v2.0.0 🚀
📣 Overview
Version 2.0.0 is a complete architectural refactor of the SMS.to integration.
The integration now follows modern Home Assistant development standards and removes all deprecated patterns. Functionality remains the same:
- ✅ Send SMS notifications
- ✅ Monitor account balance
- ✅ Track total SMS sent
The difference is under the hood: cleaner code, proper coordinator usage, safer HTTP handling, and long-term compatibility.
🔄 What’s New in v2.0.0
✅ DataUpdateCoordinator Implementation
- Replaced deprecated
@Throttlewith DataUpdateCoordinator - Both sensors (Balance + Total SMS Sent) update in a single coordinated cycle
- Update interval: 5 minutes
- Partial data handling: if one endpoint fails, available data is still exposed
Impact:
More reliable updates, no silent failures, and proper HA-native behavior.
✅ Modern Sensor Architecture
- Migrated from
Entityto:SensorEntityCoordinatorEntity
- Declarative definitions via
SensorEntityDescription state→native_valueunit_of_measurement→native_unit_of_measurement- Added:
has_entity_name = Truetranslation_keySensorStateClass(MEASUREMENTfor balance,TOTALfor messages)
- Proper
DeviceInfodataclass usage - Missing data now returns
None(entity becomes unavailable)- No more
"Error"or"Unavailable"string states
- No more
Impact:
Fully aligned with current and upcoming HA core requirements.
✅ Shared aiohttp Client Session
- Removed per-request
aiohttp.ClientSession()creation - Now uses Home Assistant’s
async_get_clientsession() - Eliminates unclosed session warnings and resource leaks
Impact:
Correct HTTP lifecycle management and improved stability.
✅ Clean & Structured API Client
- Removed unused
BaseNotificationServiceinheritance - Deleted dead
async_get_service()function - Centralized API URLs in
const.py - Unified HTTP error mapping and handling
Impact:
More maintainable, predictable, and easier to extend.
✅ Improved Config Flow
- Uses
_abort_if_unique_id_configured()for duplicate detection - Modern Options Flow pattern (no
config_entryin constructor) - Test message step validates configuration before entry creation
Impact:
Cleaner configuration lifecycle and proper HA compliance.
✅ Robust Service Registration
notify.smstonow includes:- Voluptuous runtime validation
- Full UI schema (Developer Tools support)
- Service is only removed when the last config entry is unloaded
- Supports multiple integration entries
Impact:
Stable multi-account support and better developer experience.
✅ General Code Cleanup
- Removed duplicate imports
- Consistent logging prefixes:
Coordinator:SMSToNotificationServicenotify.smsto
- All constants centralized in
const.py - Added
ro.jsontranslations for Romanian support
Impact:
Cleaner codebase and easier long-term maintenance.
