Sector Alarm


@mgejke I just tried to run the Sector app on my phone at it could not get status from my central at home so I quickly gathered that this was not a HA issue but an issue with the alarm system itself. When I called Sector I complained about their app, no info about HA at all :roll_eyes: Good secrets are best kept well hidden imho :smiley: :smiley:

The stated that my central was “offline”. Whatever that means. The central is GSM based. What they did I do not know but suddenly it worked again. The probably booted it or something similar.

Mains and mainsrestore might be if the central looses power from the mains in the house. I know that the system puts out alarms on both loosing power, low battery on devices and more. This data is relayed to Sector and not to the user/app or similar. Not sure if the log entries you see could be related?


Just tried this on with 0.59.2 and works fine so far.
Does not need any hacks or add-ons…

Instructions for

  1. Download hass-sectoralarm and asyncsector
  2. Create a new folder in hass io config folder called custom_components
  3. Put the content from hass-sectoralarm and the folder asyncsector from asyncsector in to the newly created folder.
  4. Edit configuration.yaml and add the settings… here is an example
      email: [email protected]
      password: 12345678
      alarm_id: 12345678
      code: 00000
      thermometers: true
      alarm_panel: true

This is how the custom_components folder look:


Great that it works!
However, you shouldn’t have to download asyncsector, home assistant should handle that dependency by itself.


I have tried this too and it works! I have been looking for this functionality a long time, thanks!
However, I can confirm that asyncsector folder needs to be in custom_components on a install.

One questions though:
How do I show the attributes last_changed and changed_by in the UI?
I have added the following to my customize.yaml, but nothing shows.

  show_last_changed: true
  show_changed_by: true


Ok, my bad. Forgot state-card-custom-ui. But now I am trying to show both last_changed and changed_by like this:

  custom_ui_state_card: state-card-custom-ui
  extra_data_template: ${attributes.last_changed} av ${attributes.changed_by}

But it show “undefined by [username]”, so last_changed doesn’t work.


Haven’t actually tried, I just assumed it would resolve dependencies like a plain HA-install would, but if you say asyncsector-folder is needed I’ll trust you :slight_smile:

There is no last_changed attribute on the alarm component. Where did you get that from? I guess it could be added…


@mgejke great addon to HA!

Must admit that I’m a bit new to this but appreciate if any help can be provided.
I’ve added the components according to @endor instructions but get the following error:

Error during setup of component sector_alarm
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/”, line 190, in _async_setup_component
result = yield from component.async_setup(hass, processed_config)
File “/config/custom_components/”, line 83, in async_setup
KeyError: ‘code’

I’m running Hassio, 0.60.1 and added asyncsector to the custom_components folder as well.

Any thoughts on how to get this fixed?



Have you entered the configuration.yaml data. Seems like something could be wrong with that and specifically the content or lack of code: parameter?


@endor Thanks, now it works! As it was set as “optional” I pressumed that I could leave it out completely.


Hmm yes, that is strange.
You could enter 0000 as code if you don’t plan to use homeassistant for arming or disarming your alarm, that way you will never expose your pin in a text file.


It should be optional, I’ll fix that!


Would be very very nice! …If only I could get it to work. :slight_smile:

No AlarmPanel on first page. No Entities under states-page. Only visible i could find is ‘Sector Alarm 1234567’ under History with status ‘unkown’. Zero errors in home-assistant.log

Running 0.60 and since today 0.60.1.
Have been following endor’s instructions.

configuration.yaml contains the following:
email: [email protected]
password: zxczxc
alarm_id: 0987654
code: 1234

Files in config/custom_components/:

Files in config/custom_components/asyncsector/

Files in config/custom_components/asyncsector/asyncsector/:
I Copied this files to the previous folder just to be on the safe side.

I’m sure the alarm_id is the right one. Any idea what i can try next?


Don’t know what’s wrong really, but you can try this:

Remove thermometers and the alarm_panel lines from your config.

Also, dont copy the files from config/custom_components/asyncsector/asyncsector/ to the upper folder.


Thanks for a great component, I have been looking a long time for a way to integrate Sector Alarm into HA!
Would it also be possible to add door sensors?


I have the same issue as @Jesperj. Tried on both HA and


I don’t think so, from what I’ve seen there’s no information about the door sensors on their homepage(might have changed). And anyhow, since it keeps up with Sector Alarm by polling, it might as well miss that a door was open(unless there’s some kind of history).


What kind of sensors and equipment from Sector Alarm do you have?


I’m new to HASS and decided to go the way. However I can’t get this to work. The home-assistant.log has some entries:

In the supervisor log

I’m running version 0.62.0.

I have copies the files into custom_components folder. Added the configuration into configuration.yaml.

Any ideas?


Seems to be trying to fetch temperatures but failing, try setting
thermometers: false
in your config.


@Jesperj, @donjohann
Does your alarm_id start with a zero?
alarm_id: “xxxxxxx”