Adding school lunch sensor
This commit is contained in:
parent
4a163af0ea
commit
eebbd238a5
|
@ -106,6 +106,14 @@ sensor:
|
|||
school_end_days2go:
|
||||
value_template: '{{ (((states.input_datetime.school_last_day.attributes.timestamp)-as_timestamp(now())) | int /60/1440) | round(0) }}'
|
||||
unit_of_measurement: 'Days'
|
||||
- platform: rest
|
||||
resource: https://raw.githubusercontent.com/thejeffreystone/home-assistant-configuration/master/config/packages/json_data/school_lunch.json
|
||||
name: School Lunch
|
||||
scan_interval: 14400
|
||||
value_template: >
|
||||
{% set today = now().month ~ '/' ~ now().day %}
|
||||
{% set lunch = value_json.MENU.static[ today ] %}
|
||||
{{ lunch }}
|
||||
|
||||
automation:
|
||||
- id: refresh_special_event_sensors
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"MENU": {
|
||||
"static": {
|
||||
"3/2": "Quesadillas",
|
||||
"3/3": "Pizza",
|
||||
"3/4": "Taco Burger",
|
||||
"3/11": "Burger",
|
||||
"3/12": "Pizza",
|
||||
"3/18": "Pizza",
|
||||
"3/19": "Mac and Cheese",
|
||||
"3/23": "Quesadilla",
|
||||
"3/24": "Pizza",
|
||||
"3/25": "Taco Burger",
|
||||
"4/1": "Burger",
|
||||
"4/2": "Pizza",
|
||||
"4/13": "Quesadilla",
|
||||
"4/14": "Pizza",
|
||||
"4/15": "Taco Burger",
|
||||
"4/22": "Burger",
|
||||
"4/23": "Pizza",
|
||||
"4/29": "Pizza",
|
||||
"4/30": "Mac and Cheese"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue