Config.yaml [alias] is an invalid option for [rest_command]

Hi All,

I am trying to get this code working on my HA that is posted here: https://hometechhacker.com/how-home-assistant-runs-my-irrigation-controller/

I added the following to my config file:

rest_command: !include rest.yaml

Then I created the file called rest.yaml

etherrain_login:
  url: http://10.1.1.117/ergetcfg.cgi?lu=admin&lp=pw
stop_irrigation:
  url: http://10.1.1.117/result.cgi?xr
front_yard:
  url: http://10.1.1.117/result.cgi?xi=0:90:0:0:0:0:0:0
south_strip:
  url: http://10.1.1.117/result.cgi?xi=0:0:90:0:0:0:0:0
north_strip:
  url: http://10.1.1.117/result.cgi?xi=0:0:0:90:0:0:0:0
south_backyard:
  url: http://10.1.1.117/result.cgi?xi=0:0:0:0:90:0:0:0
north_backyard:
  url: http://10.1.1.117/result.cgi?xi=0:0:0:0:0:90:0:0
front_plants:
  url: http://10.1.1.117/result.cgi?xi=0:0:0:0:0:0:0:90
all_90min:
  url: http://10.1.1.117/result.cgi?xi=0:90:90:90:90:90:90:90


start_front_yard_irrigation:
  alias: Start Front Yard Irrigation
  sequence:
  - service: rest_command.etherrain_login
  - service: rest_command.stop_irrigation
  - service: rest_command.front_yard
start_south_strip_irrigation:
  alias: Start South Strip Irrigation
  sequence:
  - service: rest_command.etherrain_login
  - service: rest_command.stop_irrigation
  - service: rest_command.south_strip
start_north_strip_irrigation:
  alias: Start North Strip Irrigation
  sequence:
  - service: rest_command.etherrain_login
  - service: rest_command.stop_irrigation
  - service: rest_command.north_strip
start_south_backyard_irrigation:
  alias: Start South Backyard Irrigation
  sequence:
  - service: rest_command.etherrain_login
  - service: rest_command.stop_irrigation
  - service: rest_command.south_backyard
start_north_back_yard_irrigation:
  alias: Start North Backyard Irrigation
  sequence:
  - service: rest_command.etherrain_login
  - service: rest_command.stop_irrigation
  - service: rest_command.north_backyard
start_front_plants_irrigation:
  alias: Start Front Plants Irrigation
  sequence:
  - service: rest_command.etherrain_login
  - service: rest_command.stop_irrigation
  - service: rest_command.front_plants
start_all_irrigation:
  alias: Start All Irrigation Zones
  sequence:
  - service: rest_command.etherrain_login
  - service: rest_command.stop_irrigation
  - service: rest_command.all_90min
stop_all_irrigation:
  alias: Stop All Irrigation
  sequence:
  - service: rest_command.etherrain_login
  - service: rest_command.stop_irrigation

I get the error:

Invalid config for [rest_command]: [alias] is an invalid option for [rest_command]. Check: rest_command->rest_command->start_front_yard_irrigation->alias. (See /config/configuration.yaml, line 15).

I’ve tried playing with it some, but the best I have gotten is the error just moves on down to the next line (when i comment-out the alias line). Any help would be appreciated!

rest.yaml indentation is wrong

  etherrain_login:
    url: http://10.1.1.117/ergetcfg.cgi?lu=admin&lp=pw
  stop_irrigation:
    url: http://10.1.1.117/result.cgi?xr
  front_yard:
    url: http://10.1.1.117/result.cgi?xi=0:90:0:0:0:0:0:0
  south_strip:
    url: http://10.1.1.117/result.cgi?xi=0:0:90:0:0:0:0:0
  north_strip:
    url: http://10.1.1.117/result.cgi?xi=0:0:0:90:0:0:0:0
  south_backyard:
    url: http://10.1.1.117/result.cgi?xi=0:0:0:0:90:0:0:0
  north_backyard:
    url: http://10.1.1.117/result.cgi?xi=0:0:0:0:0:90:0:0
  front_plants:
    url: http://10.1.1.117/result.cgi?xi=0:0:0:0:0:0:0:90
  all_90min:
    url: http://10.1.1.117/result.cgi?xi=0:90:90:90:90:90:90:90

The rest of the code that has an alias you put in the script.yaml file

1 Like

That was fast! I appreciate it! Solved.

No it isn’t. Not for an include file.

That is the issue.

1 Like