Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Weather Warning ⛈ #36

Closed
dannytsang opened this issue Feb 22, 2022 · 1 comment
Closed

Create Weather Warning ⛈ #36

dannytsang opened this issue Feb 22, 2022 · 1 comment

Comments

@dannytsang
Copy link
Owner

Create weather warning alerts and maybe use it to drive some of the modes like the lockdown mode in #35

@dannytsang
Copy link
Owner Author

Using feedparser to get weather warning via RSS from the met office 927017c

There are 2 UI methods I use to both using custom integrations / front end from HACS.

First method using Mushroom to show a chip:

type: custom:mushroom-chips-card
chips:
  - type: conditional
    conditions:
      - entity: sensor.met_office_rss_weather_warnings
        state_not: '0'
    chip:
      type: weather
      entity: weather.openweathermap
      show_conditions: true
      show_temperature: true

When there is 1 or more entries in the RSS for my area, it will show a chip with the OpenWeatherMap.
image

The other method is to use auto-entities to show when there is 1 or more events in the RSS:

type: custom:auto-entities
card:
  type: custom:mushroom-template-card
  primary: >-
    {{ state_attr('sensor.met_office_rss_weather_warnings', 'entries')[0].title
    }}
  secondary: ''
  icon: mdi:weather-cloudy-alert
  fill_container: false
  icon_color: yellow
filter:
  include:
    - entity_id: sensor.met_office_rss_weather_warnings
      state: '> 0'
show_empty: false
sort:
  method: state
  ignore_case: true

It uses Mushroom template card to show the RSS warning message. The Mushroom template card gives more control so I have used a yellow background to highlight the weather warning message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant