Ma première contribution
Dans mon département soumis aux incendies, on a des restrictions pendant la période chaude pour accéder aux massifs.
La carte est mise à jour tous les soirs vers 17:00
Je récupère le json:
http://bpatp.paca-ate.fr/services/getZapefs.php
Un coup de jq ( a vous d’adapter selon le massif )
Le capteur:
command_line:
- sensor:
name: feux_foret
scan_interval: 3600
command: curl "http://bpatp.paca-ate.fr/services/getZapefs.php" | jq ".features[2].properties.NomZapef"
- sensor:
name: feux_niveau
scan_interval: 3600
command: curl "http://bpatp.paca-ate.fr/services/getZapefs.php" | jq ".features[2].properties.Niveau"
La Carte Markdown
## Niveaux feux Fontvielle
{{ now().strftime('%d-%m-%y') }}
{% if is_state('sensor.feux_niveau', '0') %} <ha-alert alert-type="success">Accès autorisé / Travaux réglementés </ha-alert>
{% elif is_state('sensor.feux_niveau', '1')%} <ha-alert alert-type="warning">Accès autorisé / Travaux autorisés de 5h à 13</ha-alert>
{% else %} <ha-alert alert-type="error">Accès interdit / Travaux interdits </ha-alert>
{% endif %}
http://bpatp.paca-ate.fr/
C’est perfectible mais ça marche