Problem with Dummy Switch and Notify Service

Hello Guys,
Today I’ve redeveloped an old android tablet that I had as a digital photo frame. I wanted to manage the screen brightness with Homekit and HomeAssistant in order to insert the frame into my automations. Everything it’s set up correctly, cause if I manually call the Notify service I can dim or increase the brightness on the Tablet, but now when I’m trying to create a dummy switch in order to expose a easy trigger for the automations, where: Switch Turned On - Call notify service with the parameters for bright up, and Switch Turned Off, call again the same service but this time with the parameter for bright 0%.

I’ve tried so many different approaches, fake switch with scripts, fake switch with the 2 commands, but no luck at all…

These are the 2 scripts, that if I call them directly, they work perfectly…

  alias: photoframe_on
  - data:
      message: brightness100
    service: notify.photo_frame
  alias: photoframe_off
  - data:
      message: brightness0
    service: notify.photo_frame

Anyone is so kind to show me some real life example on how to do it??


Get rid of the scripts, do it in an automation with an input_boolean…

    name: Photo Frame
    icon: mdi:image

  - alias: Toggle photo frame
      platform: state 
      entity_id: input_boolean.photo_frame
      service: notify.photo_frame
        message: >
          {% if is_state('input_boolean.photo_frame' , 'on') %} brightness100
          {% else %} brightness0 {% endif %}

Thank you so much for your help!
I’ve created the automation but I receive this error…

**Log Details (ERROR)**

Wed Aug 29 2018 03:08:51 GMT+0100 (BST)

Invalid config for [automation]: [input_boolean] is an invalid option for [automation]. Check: automation->input_boolean. (See /config/configuration.yaml, line 69). Please check the docs at

Why it’s saying that’s an invalid option?

I’ve tried to put the boolean in config.yaml as it should be but it’s not working, same error, and it’s the same if its in automation.yaml

these are the lines just before and after the one that the error mention:

# Weather prediction
  - platform: yr

# Text to speech
#  - platform: google

# Cloud

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

There is nothing wrong there…

The input_boolean decleration needs to be in your configuration.yaml not your automations.yaml :+1: