Skip to content

Latest commit

 

History

History
executable file
·
765 lines (734 loc) · 41 KB

File metadata and controls

executable file
·
765 lines (734 loc) · 41 KB

Configuration variables (in bwalarm.yaml)

platform
    (string) (Required)
    Domain name of this integration. Please do not change.
 
    Default value:
    bwalarm

name
    (string) (Optional)
    Name of the integration entity.
 
    Default value:
    House

pending_time
    (number) (Optional)
    Grace time (in seconds) to allow for exit/entry.
 
    Default value:
    25

warning_time
    (number) (Optional)
    Time (in seconds) before triggering the alarm if a sensor has been tripped.
 
    Default value:
    25

trigger_time
    (number) (Optional)
    Time (in seconds) the alarm remains in Triggered mode. After that it returns back to previously set alarm mode.
 
    Default value:
    600

code
    (string) (Required)
    Master passcode to set/disarm the alarm. It must consist of one or more digits surrounded by quotes.

code_to_arm
    (boolean) (Optional)
    If true, a master/user passcode is required to set the alarm via panel/MQTT command/service call.
 
    Default value:
    false

passcode_attempts
    (number) (Optional)
    If greater than 0, the system will only allow the set amount of password attempts before timing out.
    -1 allows for unlimited number of attempts.
 
    Default value:
    -1

passcode_attempts_timeout
    (number) (Optional)
    When passcode_attempts>0 and the passcode is entered incorrectly passcode_attempts times,
    the panel will timeout for the amount set (in seconds) and then reset the number of passcode attempts.
 
    Default value:
    30

panic_code
    (string) (Optional)
    Panic passcode disarms the alarm and set a special panic mode attribute that could be used in
    your automations to send a notification to the police/spouse/neighbour that you are under duress.
    To clear this attribute arm and then disarm your alarm in the usual manner.
    It must consist of one or more digits surrounded by quotes.

custom_supported_statuses_on
    (list) (Optional)
    List of strings to consider as sensor's on states in addition to standard ones.
    Allows to use sensors that do not have standard (on, True, detected etc) on states.

custom_supported_statuses_off
    (list) (Optional)
    List of strings to consider as sensor's off states in addition to standard ones.
    Allows to use sensors that do not have standard (off, False, closed etc) off states.

warning
    (string) (Optional)
    Entity ID to turn on when the alarm has been tripped.

alarm
    (string) (Optional)
    Entity ID to turn on when the alarm has been triggered.

enable_log
    (boolean) (Optional)
    If true, the alarm saves log of actions to a file. Its content is available in the Activity Log
    tab at the bottom of the panel.
 
    Default value:
    true

log_size
    (number) (Optional)
    Maximum number of the last events to display in the log file.
 
    Default value:
    10

states
    (map) (Optional)
    Configurations for supported alarm modes.
 
    armed_away
        (map) (Required)
        Configuration variables for the Away mode.
 
        immediate
            (list) (Optional)
            Tripping sensors from this list immediately changes the alarm's mode to Triggered.
 
        delayed
            (list) (Optional)
            Tripping sensors from this list starts warning countdown and changes the alarm's mode
            to Warning before triggering.
 
        override
            (list) (Optional)
            By default upon setting the alarm it checks if any the of sensors from immediate
            and delayed lists are on and prevents from proceeding if any of them are on.
            To exclude some sensors from that check (motion sensor at the front door, for example)
            add those sensors to this list.
 
        pending_time
            (number) (Optional)
            Grace time (in seconds) to allow for exit/entry.
 
            Default value:
            appropriate top-level value
 
        warning_time
            (number) (Optional)
            Time (in seconds) before triggering the alarm if a sensor has been tripped.
 
            Default value:
            appropriate top-level value
 
        trigger_time
            (number) (Optional)
            Time (in seconds) the alarm remains in Triggered mode. After that it returns back
            to the previously set alarm mode.
 
            Default value:
            appropriate top-level value
 
    armed_home
        (map) (Required)
        Configuration variables for the Home mode.
 
        immediate
            (list) (Optional)
            Tripping sensors from this list immediately changes the alarm's mode to Triggered.
 
        delayed
            (list) (Optional)
            Tripping sensors from this list starts warning countdown and changes the alarm's mode
            to Warning before triggering.
 
        override
            (list) (Optional)
            By default upon setting the alarm it checks if any the of sensors from immediate
            and delayed lists are off and prevents from proceeding if any of them are on.
            To exclude some sensors from that check (motion sensor at the front door, for example)
            add those sensors to this list.
 
        pending_time
            (number) (Optional)
            Grace time (in seconds) to allow for exit/entry.
 
            Default value:
            appropriate top-level value
 
        warning_time
            (number) (Optional)
            Time (in seconds) before triggering the alarm if a sensor has been tripped.
 
            Default value:
            appropriate top-level value
 
        trigger_time
            (number) (Optional)
            Time (in seconds) the alarm remains in Triggered mode. After that it returns back
            to the previously set alarm mode.
 
            Default value:
            appropriate top-level value
 
    armed_night
        (map) (Optional)
        Configuration variables for the Night mode.
        Check enable_night_mode variable description for details.
 
        immediate
            (list) (Optional)
            Tripping sensors from this list immediately changes the alarm's mode to Triggered.
 
        delayed
            (list) (Optional)
            Tripping sensors from this list starts warning countdown and changes the alarm's mode
            to Warning before triggering.
 
        override
            (list) (Optional)
            By default upon setting the alarm it checks if any the of sensors from immediate
            and delayed lists are off and prevents from proceeding if any of them are on.
            To exclude some sensors from that check (motion sensor at the front door, for example)
            add those sensors to this list.
 
        pending_time
            (number) (Optional)
            Grace time (in seconds) to allow for exit/entry.
 
            Default value:
            appropriate top-level value
 
        warning_time
            (number) (Optional)
            Time (in seconds) before triggering the alarm if a sensor has been tripped.
 
            Default value:
            appropriate top-level value
 
        trigger_time
            (number) (Optional)
            Time (in seconds) the alarm remains in Triggered mode. After that it returns back
            to the previously set alarm mode.
 
            Default value:
            appropriate top-level value

enable_night_mode
    (boolean) (Optional)
    If true, adds NIGHT button to the panel and allows setting the alarm to Night mode via MQTT/service call.
 
    Default value:
    false

enable_persistence
    (boolean) (Optional)
    If true, allows the alarm to save its state to file and then reinstate it in the event of power loss.
 
    Default value:
    false

ignore_open_sensors
    (boolean) (Optional)
    If false, set the alarm only if there is no active sensors. Otherwise set the alarm without checking sensors' states.
 
    Default value:
    false

users
    (list) (Optional)
    List of users' configuration variables grouped by their IDs.
 
    id
        (map) (Required)
        Unique user ID.
        The integration gathers all necessary information automatically if the panel uses admin credentials when accessing
        Home Assistant.
 
        name
            (string) (Required)
            Human-friendly user name.
 
        picture
            (string) (Optional)
            Filename of a badge to be used in the Activity Log next to this user's name.
 
        code
            (string) (Required)
            Unique user passcode to set/disarm the alarm that fulfills the passcode requirements.
 
        enabled
            (boolean) (Optional)
            If true, this user can control the alarm.
 
            Default value:
            true

mqtt
   (map) (Optional)
    MQTT configuration variables.
    See more details about MQTT interface below.
 
    enable_mqtt
        (boolean) (Required)
        Enables/disables MQTT interface of the alarm, i.e ability to control it with MQTT messages and get its status
        by subscribing to the state topic.
 
    qos
        (number) (Optional)
        The maximum QoS level for MQTT messages.
 
        Default value:
        0
 
    state_topic
        (string) (Optional)
        The MQTT topic the alarm will publish its state updates to.
 
        Default value:
        home/alarm
 
    command_topic
        (string) (Optional)
        The MQTT topic the alarm will subscribe to, to receive commands.
 
        Default value:
        home/alarm/set
 
    payload_arm_away
        (string) (Optional)
        The MQTT payload to set the alarm to Away mode.
 
        Default value:
        ARM_AWAY
 
    payload_arm_home
        (string) (Optional)
        The MQTT payload to set the alarm to Home mode.
 
        Default value:
        ARM_HOME
 
    payload_arm_night
        (string) (Optional)
        The MQTT payload to set the alarm to Night mode.
 
        Default value:
        ARM_NIGHT
 
    payload_disarm
        (string) (Optional)
        The MQTT payload to disarm the alarm.
 
        Default value:
        DISARM
 
    override_code
        (boolean) (Optional)
        If true, allows MQTT commands to disarm the alarm without a code.
 
        Default value:
        false
 
    pending_on_warning
        (boolean) (Optional)
        If true, publishes pending state when the alarm is tripped instead of warning.
        This is to allow integration with other MQTT panels which react to this state.
 
        Default value:
        false

panel
   (map) (Optional)
    Panel (GUI) configuration variables.
 
    panel_title
        (string) (Optional)
       Prefix to show in front of alarm status in the status bar.
       Use empty string or remove the attribute completely to hide it from the screen.
 
    enable_clock
        (boolean) (Optional)
        If true, displays current time in the status bar.
        Note that sensor.time must exist within your Home Assistant configuration for this option to work.
 
        Default value:
        true
 
    enable_clock_12hr
        (boolean) (Optional)
        If true, displays clock in 12hour mode.
 
        Default value:
        false
 
    enable_weather
        (boolean) (Optional)
        If true, displays the weather summary in the status bar.
        Note that sensor.weather_summary or sensor.dark_sky_summary must exist within your
        Home Assistant configuration for this option to work.
 
        Default value:
        false
 
    enable_sensors_panel
        (boolean) (Optional)
        If true, adds Alarm Sensors tab to the bottom of the panel.
 
        Default value:
        true
 
    enable_fahrenheit
        (boolean) (Optional)
        If true, displays the temperature in Fahrenheit.
 
        Default value:
        false
 
    hide_passcode
        (boolean) (Optional)
        If true, masks the passcode within the panel input box when typing.
 
        Default value:
        false
 
    hide_sidebar
        (boolean) (Optional)
        If true, this security feature hides the Home Assistant sidebar to prevent access to
        Home Assistant settings when the alarm is set. The sidebar re-appears when the alarm is disarmed.
        Note: if your Home Assistant is v96.3 or newer, go to your Profile settings in Home Assistant
        and select Always hide the sidebar for this option to work correctly.
 
        Default value:
        true
 
    hide_sensors
        (boolean) (Optional)
        If true, this security feature hides the Alarm Sensors tab while the alarm is set.
 
        Default value:
        true
 
    round_buttons
        (boolean) (Optional)
        Choose whether the alarm buttons should be round or rectangular.
 
        Default value:
        false
 
    shadow_effect
        (boolean) (Optional)
        If true, adds shadow effect to text.
 
        Default value:
        false
 
    enable_serif_font
        (boolean) (Optional)
        If true, Lobster serif font will be used to display the title, time and weather.
 
        Default value:
        false
 
    enable_camera_panel
        (boolean) (Optional)
        If true, cameras listed below to be displayed as a panel.
 
        Default value:
        false
 
    cameras
        (list) (Optional)
        List of cameras' entity IDs to display their feeds.
 
    camera_update_interval
        (number) (Optional)
        Time (in seconds) the camera(s)' image updates.
 
        Default value:
        5

themes
    (map) (Optional)
    Themes allow you to override the default Home Assistant colors.
    See more details about defining colors below.
 
    name
        (string) (Required)
        Unique name of the theme.
 
        active
            (boolean) (Optional)
            Only active theme overrides default Home Assistant colors.
 
            Default value:
            false
 
        disarmed_color
            (string) (Optional)
            When the alarm is disarmed the panel will display this color in both the top
            header background and the centre panel background.
 
        pending_color
            (string) (Optional)
            When the alarm is arming the panel will display this color in both the top
            header and the centre panel background.
 
        armed_away_color
            (string) (Optional)
            When the alarm is in Away mode the panel will display this color in both the top
            header background and the centre panel background.
 
        armed_home_color
            (string) (Optional)
            When the alarm is in Home mode the panel will display this color in both the top
            header background and the centre panel background.
 
        armed_night_color
            (string) (Optional)
            When the alarm is in Night mode the panel will display this color in both the top
            header background and the centre panel background.
 
        warning_color
            (string) (Optional)
            If a sensor is tripped when the alarm is set the panel will display this color in both the top
            header background and the centre panel background.
 
        triggered_color
            (string) (Optional)
            When the alarm has been triggered the panel will display this color in both the top
            header background and the centre panel background.
 
        panel_background_color
            (string) (Optional)
            The background color of the main content section.
 
        panel_outer_background_color
            (string) (Optional)
            The background color of both the status bar and the menu bar.
 
        panel_text_color
            (string) (Optional)
            The color of the general text within the panel.
 
        header_background_color
            (string) (Optional)
            The background color of very top header bar.
 
        header_text_color
            (string) (Optional)
            The text color on very top header bar.
 
        alarmstatus_text_color
            (string) (Optional)
            The text color to display the alarm status.
 
        time_text_color
            (string) (Optional)
            The text color to display time.
 
        weather_text_color
            (string) (Optional)
            The text color to display weather summary.
 
        weather_image_color
            (string) (Optional)
            The color of weather image.
 
        info_header_text_color
            (string) (Optional)
            The color of the heading within a particular section.
 
        info_detail_text_color
            (string) (Optional)
            The color of the descriptive text within a particular section.
 
        title_text_color
            (string) (Optional)
            The color of the title text within a particular section.
 
        subtitle_text_color
            (string) (Optional)
            The color of the subtitle text within a particular section.
 
        opensensors_title_color
            (string) (Optional)
            The color of the Open Sensors dialog.
 
        button_background_color
            (string) (Optional)
            The background color of the alarm buttons.
 
        cancel_color
            (string) (Optional)
            The background color of the Cancel button.
 
        override_color
            (string) (Optional)
            The background color of the Override button.
 
        info_panel_buttons_color
            (string) (Optional)
            The color of the menu buttons.
 
        arm_button_border_color
            (string) (Optional)
            The border color of the alarm buttons.
 
        arm_button_text_color
            (string) (Optional)
            The color of the text within the alarm buttons.
 
        paper_listbox_background_color
            (string) (Optional)
            The background color of the listboxes.
 
        paper_listbox_color
            (string) (Optional)
            The text color within the listboxes.
 
        paper_item_selected___color
            (string) (Optional)
            The text color of the item selected within a selection box.
 
        action_button_border_color
            (string) (Optional)
            The color of the border surrounding the action buttons.

admin_password
    (string) (Optional)
    Password to access the alarm configuration - Settings tab.
 
    Default value:
    HG28!!&dn

BOOLEAN VALUES CONVENTION

Boolean values true and false are case-sensitive.
Boolean true can be substituted by its case-insensitive string equivalent "1", "true", "yes", "on" or "enable", or any non-zero number.
Boolean false can be substituted by any string apart from string equivalents of true, or number 0.

SERVICE CALLS

All service calls use domain alarm_control_panel and accept the entity_id parameter:
entity_id
    (string) (Optional)
    Full name (domain.object_id) of the alarm integration entity to control.
    If no such variable used, the service call will applicable to all entities of this integration.

ARM PASSCODE REQUIREMENTS
Service calls alarm_arm_home, alarm_arm_away and alarm_arm_night accept optional code parameter that has extended specification compared to passcode requirements by allowing a special code "override".
This special code tells the alarm to set immediately, while with a normal code the alarm will change its state to pending first for the corresponding pending_time and then change to a corresponding Armed state.
These service calls also take into account value of ignore_open_sensors configuration variable. If it is false (default value, i.e safe arming), the alarm will be set only if there is no active sensors detected.

There is set_ignore_open_sensors service call that allows to change value of ignore_open_sensors configuration variable.
Please refer to the services' description and examples for more details.

MQTT INTERFACE

When MQTT interface is enabled, the alarm publishes its status to the state topic and listens to commands on the command topic.
There are three arm commands (for Away, Home and Night) and one disarm command and they behave exactly as corresponding service calls do. All commands are case-insensitive and accept parameters in a form of a JSON object.
Please refer to the Examples page for more details.

SETTING ALARM FROM THE PANEL

Note that if you set the alarm from the panel, it always checks for active sensors and let you choose between Arm anyway and Cancel arming if any detected.

THEMES COLORS

Color string should contain a standard HTML color name, hex color code or RGB value.
All optional themes' colors are black by default.