Help with basic automation and input_boolean

Hi,
Really struggling with something that should be so basic. Trying to do an automation with an input boolean. I have fiddled around with this for hours, if my trigger is for any change to the input_boolean then this action works (i.e. remove state:‘on’ from code below). But if I try to make it trigger on a specific state change say to ‘on’ as in the code below, it never triggers. I have tried using may formats. expressing it as a from and to, or just a to, or using on vs ‘on’ and it just is never triggered. Using latest version of HA, running on a synology NAS, python 3.5.

automation:

alias: Control Air Conditioner 
  trigger:
    platform: state
    entity_id: input_boolean.airconliving
    state: ‘on’
  action:
    service: input_boolean.turn_on
    entity_id: input_boolean.debughelp

apologies for format, not sure how to get indents going…

thanks

Are you using “curly” quotes in your trigger state? Or is that an artifact of the forum? You’ll want to make sure your text editor is using a simple ’
ala:
state: 'on'

Here’s a great site to test your code;

Just paste it in and click validate. If you’re trying to test a separate include file just be sure to put the first line back in when you test the code, or it’ll error out on line 1. :slight_smile:

1 Like

Ok, I could use certain words not allowed on forums now.

Thanks ih8gates you got it in one, rookie error, I was using OS X textedit, and it indeed had smart quotes turned on.

akajester and thanks for the link, very useful.