Alarm component - Home Assistant

I cant set a pin-code in the widget. No entity is found. I would like to define a code manually.
Im using a custom alarm component:

But the service call to disarm is exactly the same:

@asifma Is this an issue when calling service manually from HA UI or from HomeHabit app?

From Homehabit i can only Arm away and Arm home. I cant Disarm.
I cant even bind i passcode. When i try to bind a passcode, no entity is found in homehabit.
I would like to have the possibility to set any integers by myself in homehabit

@asifma Passcode doesn’t need to be bound for HA integration, since HA alarm entities have built-in passcode. It should normally be hidden when binding to HA alarm entity with passcode already.

Can you show what are the attributes for entity on “States” tab?

Im running the custom alarm component which is very powerful and popular. These are the attributes that comes from it. The passcode are stored in the user attribute within a user object. I have removed the values of all the attributes.

users: [object Object],[object Object],[object Object],[object Object]
“cameras”: [

“delayed”: [

"check_before_arm": [


“immediate”: [

"check_before_arm": [



@asifma I do need to see values for some attributes. Mainly was is the value for code_format attribute?

Hi, I actually cant find the digits in any of the attributes.
code_format: null

it would be great if I could bind a digit by myself or an other custom entity that I create in Home Assistant which has this attribute.

In your widget, what attribute are you looking at to fetch the disarm code?

The app never gets the disarm code from HA server, it just submits whatever user enters and HA compares it. The app makes the same service call as you showed in the first post, with code in service data.

The code_format attribute should be one of the known values though. The app currently supports only number (text is not supported yet). If code_format is null it means there is no code required.

Does standard HA UI works correctly with this component and asks for a code just like with build-in alarm panel components?

Yeah I got you.
Acually it does work perfectly with the standard HA UI.

Im looking at the custom component code which is for some reason:

def code_format(self):
    """One or more characters."""
    return None if self._code is None else '.+'

And Standard Home Assistant component has:

def code_format(self):
    """Return one or more digits/characters."""
    if self._code is None:
        return None
    if isinstance(self._code, str) and"^\\d+$", self._code):
        return alarm.FORMAT_NUMBER
    return alarm.FORMAT_TEXT

Anyway the standard HA UI seems to give me a digit panel even if the attribute is null.

ok, let me check on standard HA UI behavior. Will update.

Sorry, the code in the custom component is:

def code_format(self):
    """Regex for code format or None if no code is required."""
    # affects Lovelace keypad presence (None means no keypad)
#        return None if self._code is None else '.+'
    FNAME = '[code_format]'
    res = None if (self._code is None or (self._state == STATE_ALARM_DISARMED and not self.code_arm_required)) else alarm.FORMAT_NUMBER
    _LOGGER.debug("{} self._code: {}, self._state: {}, code_arm_required: {}, returning {}".format(FNAME, self._code, self._state, self.code_arm_required, res))
    return res

can you also tell me what are the values of code_arm_required and code_to_arm attributes?

Its working now!!! When I had the alarm armed it gave the code_format: number.
I also had to Add the widget in homehabit WHILE the alarm was in arm_mode. Now its working!
I love this project! Started with Tileboard, but found this way much better.

Great job! What I’m still missing is Color-picker for lights, Media_player widget, and buttons where you can define your own service calls. Same thing that exists in node-red


Oh, this is interesting. Definitely not expected behavior, but I will see if it can be improved on the app side.

Thank you!

Both of those should already be available for HA integration. If it isn’t working for you, please provide some details, there might be a bug or something.

My bad!!! Media Player works perfectly :smiley. What I meant with color-picker was more like a color wheel with the whole spectrum instead of five colors that you can define. But that has already been suggested.

Thanks again!

1 Like