I tried to install this custom components in “custom_components/sensor” folder and after adding:
platform: isholiday
name: free.tomorrow
country: “US”
days_ahead: 1
and I got this error when restarting:
Platform not found: sensor.isholiday
Any idea what I’m missing?
fgabriel
(Ferdinand Gabriel)
March 15, 2018, 3:06pm
22
For some time there has been a workday binary sensor as component in home-assistant which you can use. You don’t have to define a custom component further. Look at https://home-assistant.io/components/binary_sensor.workday/ .
1 Like
Ah… thank you! Yeah… I already used that sensor… but I was hoping to have a special sensor for holidays
EDIT: after reading more about that workday sensor… I think I can use it for holidays as well… THANKS!
fernandex00
(Fernando Tapia S)
July 14, 2018, 12:49pm
24
Is there a sensor to display how many days left for a birthday?
there is 2 I found quite interesting.
I’d like to share my countdown sensor here in hopes that someone might find it useful or have the knowledge to get it properly implemented as a built-in sensor. As you can tell by the screenshots and config, I built this for a specific purpose it is intended for multi-day away events as opposed to being a timer. (it only updates once per minute)
[image]
To implement, create a custom_components directory in the root of your Home Assistant directory. Inside that, create a sensor …
and
Hi all, quick python_script to display the number of days until some future date, which I update using an automation at midnight daily. Enjoy!
"""
Script to create a sensor displaying the number of days until some event.
Automate to update every day.
"""
EVENT = 'renew_letsencrypt'
YEAR = 2018
MONTH = 2
DAY = 8
day_of_interest = datetime.datetime(YEAR, MONTH, DAY)
now = datetime.datetime.now()
diff = day_of_interest - now
hass.states.set('sensor.' + EVENT, diff.days,{
'unit_of_measuremen…