I have a sensor that I have been using for a few years.
It has now stopped working, in that it will not create the sensor.
What may have changed in HA recently or is there some other reason it might not work.
The sensor is located at /entities/sensors/
#https://home-assistant.io/components/sensor/
####################################################
# HOLIDAYS / BIRTHDAYS 2023Mar28 #
####################################################
# sensor:
- platform: command_line
name: Holiday
command: 'cat /config/data/days.json'
value_template: >
{% set today = now().month ~ '/' ~ now().day %}
{% set holiday = value_json.MAJOR_US.static[ today ] %}
{% if holiday | trim == "" %}
{% set today = now().month ~ '/' ~ now().day ~ '/' ~ now().year %}
{% set holiday = value_json.MAJOR_US.dynamic[ today ] %}
{% endif %}
{{ holiday }}
scan_interval: 14400
####################################################
# HOLIDAYS / BIRTHDAYS TOMORROW 2023Mar28 #
####################################################
- platform: command_line
name: Holidaytomorrow
command: 'cat /config/data/days.json'
value_template: >
{% set today = now().month ~ '/' ~ (now().day+1) %}
{% set holiday = value_json.MAJOR_US.static[ today ] %}
{% if holiday | trim == "" %}
{% set today = now().month ~ '/' ~ (now().day+1) ~ '/' ~ now().year %}
{% set holiday = value_json.MAJOR_US.dynamic[ today ] %}
{% endif %}
{{ holiday }}
scan_interval: 14400
####################################################
# HOLIDAYS / BIRTHDAYS IN A WEEK 2023Mar28 #
####################################################
- platform: command_line
name: Holidayinaweek
command: 'cat /config/data/days.json'
value_template: >
{% set today = now().month ~ '/' ~ (now().day+7) %}
{% set holiday = value_json.MAJOR_US.static[ today ] %}
{% if holiday | trim == "" %}
{% set today = now().month ~ '/' ~ (now().day+7) ~ '/' ~ now().year %}
{% set holiday = value_json.MAJOR_US.dynamic[ today ] %}
{% endif %}
{{ holiday }}
scan_interval: 14400
####################################################
# END OF CONFIGURATION FILE #
####################################################
Thank you for the help