I’m still very much a newbie at all this and am trying to get a card to display the current google calendar event. After working through various iterations of other’s YAML on the forum, and several days of fiddling which came down to needing to rename the calendar so that the device_id didn’t start with a number, I’ve ended up with an entry in my configuration.yaml which reads:
If I run the built in configuration checker, I get the following error message:
Testing configuration at /config
2018-01-19 19:56:14 ERROR (SyncWorker_0) [homeassistant.util.yaml] invalid key: “OrderedDict([(‘states.calendar.homecal.attributes.message’, None)])”
in “/config/configuration.yaml”, line 194, column 0
2018-01-19 19:56:14 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: invalid key: “OrderedDict([(‘states.calendar.homecal.attributes.message’, None)])”
in “/config/configuration.yaml”, line 194, column 0
Line 194 is the value_template line. If I reboot my Pi with this in the file, the interface won’t reappear and I have to remove the entire platform…entry and reboot via SSH. The entry for the weather sensors works fine and I’ve assumed from what I’ve learnt so far that I need to keep all the sensors together which is why I’ve added calendar entry below the weather one.
The entry {{ states.calendar.homecal.attributes.message }} gives me the relevant result in the template builder under the developer tools which leads me to believe that there is something wonky with how I’m defining the sensor.
Also from that error message, looks like you have sensor.template: in your config, should be sensor:
Ignore that bit, I misread the error message.
Put the quotes outside the brackets and save the file then run homeassistant and post the error message, will be more informative than the config checker.
So it seems I can’t have tried every permutation of quotes after all! Putting the quotes outside the brackets and reinstating the event_title: seems to have done it. Thanks!
awesome, thank you I was able to reproduce the effects of the output.
One thing I"m having trouble with now, though; I’m trying to use a search term on one of the sensors, in order to populate an input selector. Specifically, I have information like “Kid1 #laundry, Kid2 #laundry, Kid3 #laundry” in the calendar as daily items. then, in the Google_Calendars.Yaml, I have the following:
According to the documentation, the #laundry should be removed when the system parses the message information. My end result is actually the full message with the hashtag included.
- alias: Laundry Day
trigger:
- platform: state
entity_id: calendar.laundry
from: 'off'
to: 'on'
action:
- service: input_select.select_option
entity_id: input_select.laundry_day
data_template:
option: "{{ states.calendar.laundry.attributes.message }}"
This gives me Kid2 #Laundry, which of course doesn’t match the entries I have in the select list. (Of course, I’d also be happy just outputting the information without using the pick list, but I’m doing this all one step at a time, while learning the process).