Need help setting my first automation

Very new user here, and I would love to get some help with what I thought would be a simple automation.
I am trying to set up an automation so that when my Envisalink EVL-3 is set to “armed away”, my Ecobee 3 will be set to “away mode”.

I have tried this, but it does not seem to work:

automation:
  alias: Thermostat to Away mode when Alarm is armed-away
  trigger:
    platform: envisalink
    entity_id: armed_away
    from: 'false'
    to: 'true'
  action:
    service: climate/set_away_mode
    data:
      away_mode: 'on'  

Any pointers?

hey @Hephaestus,

any information in the log??

@Hephaestus,

The log is always a good place to start.
Please use the < /> option in the toolbar when posting code. Your platform is a change in state, time, etc.and not the component platform. Also the service list shows and service like (item/action_now) but I believe you need to use it like (item.action_now)
I tried to make an example for you but I am pretty green myself. Good luck!

automation:
-alias: Thermostat to Away mode when Alarm is armed-away
 trigger:
   platform: state
   entity_id: armed_away
   from: 'false'
   to: 'true'
 action:
   service: climate.set_away_mode
   entity_id: 'ecobee.entity_id
   data:
     value: 'on'

Pardon my ignorance, but how do I access the log?

No worries…

It’s the i symbol in Dev Tools.

Ah - thanks.
I don’t see anything relevant, but there are a ton of lines like this:
16-09-06 11:01:54 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 11:01:54 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 11:01:54 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 11:01:54 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 11:01:54 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 11:01:54 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 11:01:57 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 11:01:57 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 11:01:57 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 11:01:59 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 11:01:59 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 11:01:59 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 11:02:24 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 11:02:24 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 11:02:24 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 11:02:25 pyenvisalink.dsc_client: No handler defined in config for 701, skipping…
16-09-06 11:02:25 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 11:02:25 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 11:05:00 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 11:05:00 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 11:05:00 pyenvisalink.envisalink_base_client: No callback configured for evl command.

Those are all flags from your config.
Chances are that the problem is stemming from the things I pointed out in your automation.
You can post your config and remove all the secure information like host, password, etc and it can be reviewed.

I would try changing your automation code first.

I did make the changes you suggested, they did not seem to work.
I will post the complete config file in a minute - need to “sanitize” it first
Where can I find a list of all the available entity id’s?

Same place as logs

The first symbol in Dev Tools is available services like (light.turn_on).
The second < > is entity ids and their states and attributes (sensor.plant_light)

I also noticed a list of entities in my config file, which I will post in a moment

Here is the config file

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: xxx
  longitude: xxx
  # Impacts weather/sunrise data
  #  elevation: 66
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: xxx

# Show links to resources in log and frontend
# introduction:

# Enables the frontend
frontend:

http:
  # Uncomment this to add a password (recommended!)
  api_password: xxx

# Checks for available updates
updater:

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time.
history:

# View all events in a logbook
logbook:

# Track the sun
sun:

# Weather Prediction
#sensor:
#  platform: yr

sensor:
  platform: forecast
  api_key: xxx
  monitored_conditions:
    - summary
    - icon
    - nearest_storm_distance
    - nearest_storm_bearing
    - precip_type
    - precip_intensity
    - precip_probability
    - temperature
    - apparent_temperature
    - dew_point
    - wind_speed
    - wind_bearing
    - cloud_cover
    - humidity
    - pressure
    - visibility
    - minutely_summary
    - hourly_summary
    - daily_summary
    - temperature_max
    - temperature_min
    - apparent_temperature_max
    - apparent_temperature_min
#   - precip_intensity_max

ecobee:
  api_key: xxx
  hold_temp: False
  
envisalink:
#optional
  port: 4025
  evl_version: 3
  keepalive_interval: 60
  zonedump_interval: 30

#required
  host: xxx
  panel_type: DSC
  user_name: xxx
  password: xxx
  code: 'xxx'

  zones:
    1:
      name: 'Front Door'
      type: 'opening'

    2:
      name: 'Entry from Garage'
      type: 'opening'

    3:
      name: 'Ground Floor Windows'
      type: 'opening'

    4:
      name: 'Back Door'
      type: 'opening'

    5:
      name: 'Living Room Motion'
      type: 'motion'

    6:
      name: 'Family Room Motion'
      type: 'motion'

    7:
      name: 'Kitchen Motion'
      type: 'motion'

    8:
      name: 'Basement Window'
      type: 'opening'

    9:
      name: 'Basement Panel Motion'
      type: 'motion'

    10:
      name: 'Basement Hallway Motion'
      type: 'motion'
      
    11:
      name: 'Second Floor Front Window'
      type: 'opening'

    12:
      name: 'Second Floor Hallway Motion'
      type: 'motion'

    13:
      name: 'Second Floor Smoke'
      type: 'smoke'

    14:
      name: 'Basement Smoke'
      type: 'smoke'

  partitions:
    1:
      name: 'Home Alarm'

group:
  thermostat:
    name: Ecobee
    entities:
      - binary_sensor.dining_room_occupancy
      - binary_sensor.family_room_occupancy
      - binary_sensor.kitchen_occupancy
      - binary_sensor.office_occupancy
      - binary_sensor.upstairs_back_occupancy
      - binary_sensor.upstairs_occupancy
      - climate.dining_room
      - sensor.dining_room_humidity
      - sensor.dining_room_temperature
      - sensor.family_room_temperature
      - sensor.kitchen_temperature
      - sensor.office_temperature
      - sensor.upstairs_back_temperature
      - sensor.upstairs_temperature

  alarm:
    name: Alarm
    entities:
      - sensor.home_alarm_keypad
      - alarm_control_panel.home_alarm
      - binary_sensor.front_door
      - binary_sensor.back_door
      - binary_sensor.entry_from_garage
      - binary_sensor.basement_hallway_motion
      - binary_sensor.basement_panel_motion
      - binary_sensor.basement_smoke
      - binary_sensor.basement_window
      - binary_sensor.family_room_motion
      - binary_sensor.ground_floor_windows
      - binary_sensor.kitchen_motion
      - binary_sensor.living_room_motion
      - binary_sensor.second_floor_front_window
      - binary_sensor.second_floor_hallway_motion
      - binary_sensor.second_floor_smoke

  weather:
    name: Weather
    entities:
      - sensor.forecastio_summary
      - sensor.forecastio_icon
      - sensor.forecastio_minutely_summary
      - sensor.forecastio_hourly_summary
      - sensor.forecastio_daily_summary
      - sensor.forecastio_daily_high_temperature
      - sensor.forecastio_daily_low_temperature
      - sensor.forecastio_daily_high_apparent_temperature
      - sensor.forecastio_daily_low_apparent_temperature
      - sensor.forecastio_nearest_storm_distance
      - sensor.forecastio_nearest_storm_bearing
      - sensor.forecastio_precip
      - sensor.forecastio_precip_intensity
      - sensor.forecastio_precip_probability
      - sensor.forecastio_temperature
      - sensor.forecastio_apparent_temperature
      - sensor.forecastio_dew_point
      - sensor.forecastio_wind_speed
      - sensor.forecastio_wind_bearing
      - sensor.forecastio_cloud_coverage
      - sensor.forecastio_humidity
      - sensor.forecastio_pressure
      - sensor.forecastio_visibility

#  sun:
#    name: Sun
#    entities:
#      - sun.sun

automation:
 -alias: Thermostat to Away mode when Alarm is armed-away
  trigger:
    platform: state
    entity_id: armed_away
    from: 'false'
    to: 'true'
  action:
    service: climate.set_away_mode
    entity_id: 'ecobee.entity_id'
    data:
      value: 'on'

Ok without seeing your entity ids this could be tough.

The code I sent is just and example.

Do you really have an entity id called ‘armed_ away’? You should have an entity id that references alarm but one of its states/attributes is armed/away. The entity id with this state/attribute will be what you use for the first entity id in the automation.

The second entity id should look like climate.some_name.

For the alarm, there is an entity called sensor.home_alarm_keypad, and one of its states is armed_away: false (I am presently at home)

For the thermostat, there is an entity called climate.dining_room, and one of its states is away_mode: off (I am assuming there is a corresponding ‘on’ for this one).

Does this help?

So maybe something like this…

automation:
-alias: Thermostat to Away mode when Alarm is armed-away
 trigger:
   platform: state
   entity_id: sensor.home_alarm_keypad
   from: 'false'
   to: 'true'
 action:
   service: climate.set_away_mode
   entity_id: climate.dining_room
   data:
     value: 'on'

Error in log resulted:

16-09-06 12:52:41 homeassistant.util.yaml: mapping values are not allowed here
in “/home/pi/.homeassistant/configuration.yaml”, line 227, column 9

Try ‘away’ instead of ‘on’

Home assistant won’t start at all now. Still get the same error
16-09-06 13:02:35 homeassistant.util.yaml: mapping values are not allowed here
in “/home/pi/.homeassistant/configuration.yaml”, line 227, column 9

You can also try removing
data: and
value: from the code all together.

check line 227 … you need an space:

you have:
-alias: Thermostat to Away mode when Alarm is armed-away

you need:

  • alias: Thermostat to Away mode when Alarm is armed-away

Thanks to the sharp eyes of davedan, the errors above are gone. But the automation does not seem to work when tested (I am assuming it would happen immediately once triggered?), and I have the following errors in the log:

16-09-06 13:09:08 homeassistant.config: Incomplete core config. Auto detected elevation: 208
16-09-06 13:09:11 pyenvisalink.dsc_client: No handler defined in config for 673, skipping…
16-09-06 13:09:11 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:09:11 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 13:09:11 pyenvisalink.dsc_client: No handler defined in config for 841, skipping…
16-09-06 13:09:11 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:09:11 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 13:09:11 pyenvisalink.dsc_client: No handler defined in config for 841, skipping…
16-09-06 13:09:11 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:09:11 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 13:09:11 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 13:09:11 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:09:11 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 13:10:07 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 13:10:07 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:10:07 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 13:10:07 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 13:10:07 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:10:07 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 13:10:09 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 13:10:09 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:10:09 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 13:10:11 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 13:10:11 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:10:11 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 13:10:37 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 13:10:37 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:10:37 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 13:10:38 pyenvisalink.dsc_client: No handler defined in config for 701, skipping…
16-09-06 13:10:38 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:10:38 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-09-06 13:11:36 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-09-06 13:11:36 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-09-06 13:11:36 pyenvisalink.envisalink_base_client: No callback configured for evl command.