Home Assistant integration for Argentina's National Weather Service (Servicio Meteorológico Nacional).
- Current weather conditions (temperature, humidity, pressure, wind)
- Feels-like temperature
- Daily forecast with high/low temperatures
- Hourly forecast details
- Automatic weather condition icons based on SMN data
- Weather Alert: Main sensor showing all active alerts
- Event-specific sensors for 11 different weather events:
- Tormenta (Thunderstorm) ⚡
- Lluvia (Rain) 🌧️
- Nevada (Snow) ❄️
- Viento (Wind) 💨
- Viento Zonda 🌪️
- Altas Temperaturas (High Temp) 🌡️
- Bajas Temperaturas (Low Temp) 🥶
- Niebla (Fog) 🌫️
- Polvo (Dust) 💨
- Humo (Smoke) 💨
- Ceniza Volcánica (Volcanic Ash) 🌋
- Short-term Alert: Critical immediate weather warnings
- Home Assistant events fired for automations (
argentina_smn_alert_created,argentina_smn_alert_updated,argentina_smn_alert_cleared)
argentina_smn.get_alerts: Get weather alerts for configured locationargentina_smn.get_alerts_for_location: Get alerts for any location ID
- Add this repository as a custom repository in HACS
- Search for "SMN" in HACS
- Click Install
- Restart Home Assistant
- Copy the
custom_components/argentina_smnfolder to yourcustom_componentsdirectory - Restart Home Assistant
- Go to Settings → Devices & Services
- Click Add Integration
- Search for SMN
- Choose one of:
- Track home location: Automatically uses your Home Assistant location
- Custom location: Enter specific latitude/longitude coordinates
The integration will automatically fetch the location name from SMN's database.
automation:
- alias: "SMN Weather Alert Notification"
trigger:
- platform: state
entity_id: binary_sensor.ciudad_de_buenos_aires_weather_alert
to: "on"
action:
- service: notify.mobile_app
data:
title: "Alerta Meteorológica"
message: "{{ state_attr('binary_sensor.ciudad_de_buenos_aires_weather_alert', 'alert_summary') }}"automation:
- alias: "Storm Alert - Close Windows"
trigger:
- platform: state
entity_id: binary_sensor.ciudad_de_buenos_aires_alert_tormenta
to: "on"
action:
- service: notify.mobile_app
data:
title: "Alerta de Tormenta"
message: "Cierra las ventanas - {{ state_attr('binary_sensor.ciudad_de_buenos_aires_alert_tormenta', 'description') }}"- Temperature (°C)
- Feels like temperature (°C)
- Humidity (%)
- Atmospheric pressure (hPa)
- Wind speed (km/h) and direction (°)
- Visibility (m)
- Weather condition with appropriate icon
- Active alert count
- Maximum severity level
- Alert summary
- Detailed instructions
- Area ID
- Last updated timestamp
This integration uses the SMN public API endpoints:
- Base URL:
https://ws1.smn.gob.ar/v1 - Authentication: JWT token (automatically managed)
- Update interval: 30 minutes for weather, 10 minutes for alerts
- Verify your internet connection
- Check Home Assistant logs for errors:
Settings → System → Logs - Restart Home Assistant
- The integration updates every 30 minutes
- Check the coordinator last update time in Developer Tools → States
- Verify SMN API is accessible from your network
- Ensure coordinates are within Argentina
- Try slightly different coordinates if your exact location isn't in SMN's database
- Use coordinates of nearby major cities
Add to configuration.yaml:
logger:
default: info
logs:
custom_components.argentina_smn: debugData provided by Servicio Meteorológico Nacional Argentina.
This integration is provided as-is under the MIT License.