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

I'm not clear on how to create this sensor only on upcoming rain forecast. #21

Open
deepcoder opened this issue Jul 22, 2024 · 3 comments

Comments

@deepcoder
Copy link

I'm not clear on how to create this sensor only on upcoming rain forecast.

☔️ Will it Rain – check if it will rain today.

The configuration screen for the integration includes temperature and wind in addition to rain. How to I create a sensor for only rain forecast?

Thank you for your work on this project!

@denysdovhan
Copy link
Owner

The sensor automatically checks current conditions agains this list of bad conditions:

https://github.com/denysdovhan/ha-check-weather/blob/main/custom_components/check_weather/binary_sensor.py#L66-L74

I can work on feature for manual selection of desired conditions. I should be hard to implement.

@deepcoder
Copy link
Author

Thanks again for you work on this project!

Just to make sure I am clear, I would like to be able to get a binary sensor for a subset of the conditions you show, in my use case, just rain above a given level, no check of temperature or wind. Perhaps picture below will give you some ideas of my interest :
subset-check

@TheoAstro
Copy link

TheoAstro commented Jul 26, 2024

@deepcoder

You can make a template like:

{% set rain = state_attr('binary_sensor.check_weather', 'precipitation') %}
{% if rain == true%}
{% set neerslag= 'Het gaat vandaag regenen' %}
{% else %} {% set neerslag= "Als het goed is blijft het vandaag droog!" %}
{% endif %}
{{neerslag}}

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

No branches or pull requests

3 participants