This component checks the weather forecast for several days in advance and concludes whether it is worth washing the car now.
This sensor should work with any weather providers in any of their settings. But please note that the sensor cannot see further than the weather provider shows. Therefore, it is recommended to set the daily mode in the weather provider settings. If necessary, you can configure a separate weather provider instance especially for this sensor.
for fc in forecast:
if fc.get(ATTR_FORECAST_TIME)[:10] == stop_date:
break
if fc.get(ATTR_FORECAST_PRECIPITATION):
self._state = False
return
if t < 0 and fc.get(ATTR_FORECAST_TEMP_LOW) is not None:
t = fc.get(ATTR_FORECAST_TEMP_LOW)
if t >= 0:
self._state = False
return
if t < 0 and fc.get(ATTR_FORECAST_TEMP) is not None:
t = fc.get(ATTR_FORECAST_TEMP)
if t >= 0:
self._state = False
return
self._state = True
think I have to be changing this a
even just the manual where to start reading.
This looks pretty cool and may give it a try.
Does it take temperature as a consideration?
It could be sunny for the next 5 days, but if the temperature drops below 32 degrees F or 0 Celcius, It may not be a good idea as the doors and locks may freeze.
No, thank you for pointing to a place where, I believe, will often cause difficulties for other people. I will now make a revised version of the script, taking into account this moment.
E andrò, in questa occasione, a stappare una bottiglia di Montepulciano d’Abruzzo
Yes, the sensor takes into account the temperature. But now it takes into account only the conditions under which the car can quickly become dirty on the road.
It is difficult to take into account the factors of freezing parts. For example, I live in Russia and in our city the last cold weather is predicted on May 3rd … I don’t have to wash my car for half a year now?
We solve this problem simply: in the cold season, we wash the car with warm water, after which we immediately blow important parts with compressed air. Such as the mechanisms of rear-view mirrors and door locks.
I’m not sure that it will be useful for everyone to take into account the low temperature factor.
But about the temperature in Fahrenheit - thanks! Now the sensor believes that the temperature is always indicated in Celsius. I’ll think about how to fix this moment.
That would be great if you could accommodate Fahrenheit degrees, I am in the US.
Also can you clarify how the sensor works? If it’s “On” does it mean that it’s OK to wash the car? If this is the case, It may not be working well for me. My sensor shows “On” and it’s currently snowing like crazy here!! Not the best time to wash the car .
I’ve done it yesterday. But for now only in beta-version in develop branch of repository.
You can test new version of script just now, download it from here
For now sensor checks the weather for every day (today and some days forward) for:
Temperature transition through zero in Celsius (the moment when snow melts on the roads)
Precipitation. All analysis methods available in the weather provider are used: by weather conditions and by precipitation intensity
Also in the last edit I added checks for precipitation in the current weather.
Awesome! Works for me! But i only see “On” and not like it’s oke to wash the car.
Also my icon is yellow. Maybe it’s better to change the color of the icon to green if it’s oke to wash your car and to red if it’s not oke.
- id: 'Tell me when I can Clear the Car'
alias: Tell me when I can Clear the Car
trigger:
- entity_id: binary_sensor.car_wash
platform: state
from: off
to:on
action:
- data_template:
title: "Home Assistant"
message: "You Should Plan to clean the car."
service: notify.stephan_phone