Cannot get binary sensor to change state triggered off google calendar

Trying to get a binary sensor to trigger off a google calendar event and for the life of me cannot get it to work. Anyone have any idea? I have other binary sensors working fine just not the calendar.

  - platform: template
    sensors:
      cheap_power:
        friendly_name: "DTE power is cheap"
        value_template: >-
          {{ states.calendar.dte_cheap, 'on' }}

I’m not really sure what you mean, but at the very least, your template should probably look like this:

{{ is_state('calendar.dte_cheap', 'on') }}

or this:

{{ states.calendar.dte_cheap.state == 'on' }}

But that’s just a guess because you don’t provide much context.

1 Like

I thought I had tried that before, but I obviously did it wrong. That did the trick and its working great now. Thanks!

1 Like