Skip to content

The custom compontnet will get fire risks and fire prohibition from the Brandrisk Ute API for the supplied position.

Notifications You must be signed in to change notification settings

Sha-Darim/brandriskute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stability-wip

Version maintained

maintainer

hacs_badge

Brandrisk Ute

Component to get swedish outdoors fire risks for Home Assistant.

The custom compontnet will, while using the supplied position, get fire risks and fire prohibition information from MSB's Brandrisk Ute API. The plugin supplies three different sensors:

  1. Current risk
  2. 3 days forecast
  3. Fire prohibition

Installation:

  1. Install this component by creating a custom_components folder in the same folder as your configuration.yaml is, if you don't already have one.
  2. Inside that folder, create another folder named brandriskute. Put the sensor.py file in there (if you copy and paste the code, make sure you do it from the raw version of the file).
  3. Add the configuration to your configuration.yaml using the config options below.
  4. You will need to restart after installation for the component to start working.

Configuration variables:

key type description
platform (Required) string brandriskute
latitude (Optional) string The latitude of the position from which the sensor should look for fire risks messages. Default home zone latitude
longitude (Optional) string The longitude of the position from which the sensor should look for fire risks messages. Default home zone longitude
name (Optional) string Custom name for the sensor. Default Brandrisk Ute.
verbose (Optional) boolean Use full information or the the basics only. Default True
forecast (Optional) boolean Use forecast sensor. Default True
prohibition (Optional) boolean Use prohibition sensor. Default True

Example minimal configuration.yaml

sensor:
  - platform: brandriskute

Example configuration.yaml using latitude/longitude from secrets

sensor:
  - platform: brandriskute
    latitude: !secret lat_coord
    longitude: !secret long_coord
    forecast: false
    prohibition: true
    verbose: false

Example automation using prohibition change

alias: 'Eldningsförbud Alert'
initial_state: 'on'
trigger:
  - platform: state
    entity_id: sensor.brandriskute_prohibition
action:
  - service: notify.mobile_app_user
    data:
      message: "{{ states('sensor.brandriskute_prohibition') }} {{ state_attr('sensor.brandriskute_prohibition', 'startDate') }} {{ state_attr('sensor.brandriskute_prohibition', 'description') }}

Buy Me A Coffee

About

The custom compontnet will get fire risks and fire prohibition from the Brandrisk Ute API for the supplied position.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages