Giter VIP home page Giter VIP logo

brandriskute's Introduction

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

brandriskute's People

Contributors

dsorlov avatar sha-darim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.