Sensor template for Verisure alarm_control_panel

Hi,
I have a verisure alarm configured that shows like this in the states page.

Entity ID
alarm_control_panel.home_alarm
 
State
armed_away
 
State attributes (JSON, optional)
{
  "code_format": "^\\d{6}$",
  "changed_by": "FirstName LastName",
  "friendly_name": "Home alarm"
}

I would like to be able to show the changed_by field on the GUI, and to use as part of an automation, which needs to know who activated the alarm.

I have included this in a yaml file in a sensor folder

- platform: template
  sensors:
    spick_clean_start:
      value_template: '{{ states.sensor.spick_status.attributes.clean_start }}'
      friendly_name: 'Clean Start'
    span_clean_start:
      value_template: '{{ states.sensor.span_status.attributes.clean_start }}'
      friendly_name: 'Clean Start'
    verisure_armedBy:
      value_template: '{{ states.alarm_control_panel.home_alarm.attributes.changed_by }}'
      friendly_name: 'Changed by'

and included this in my configuration with

sensor: !include_dir_merge_list sensor

The first two entries work correctly but I keep getting an error saying the sensor template is invalid for verisure_armedBy

I am wondering if the there is something special with the alarm_control_panel entity?

I have tried to look in the DB but I can’t find the correct syntax to refer to the entity.

Sorry :frowning:

Just figured it out, and it is criminally stupid. It was the capital in verisure_armedBy

I didn’t realise sensor names had to be lower case