Skip to content

BrandMeister Event Feed for Home Assistant

Notifications You must be signed in to change notification settings

majkrzak/bm_feed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"BrandMeister Event Feed"

Home Assistant component for accessing feed of BrandMeister events.

Installation

Clone this repository into custom_components directory.

Configuration

Currently, the configuration can only be done via the configuration.yaml file, where bm_feed object like bellow have to be created.

bm_feed:
  triggers:
    - ">MYCALL" # Capture all calls to MYCALL
    - ">#12345" # Capture all calls to ID 12345
    - ">@#1234" # Capture all calls to TG 1234
    - "<YMCALL" # Capture all calls from YMCALL
    - "<#12345" # Capture all calls from ID 12345

Simple LALR grammar is provided, which allows to combine filters by using "and" &, "or" | and "not" ! operators together with "parentheses" (). The last is required as all operators have same precedence.

">MYCALL&!(<YMCALL|<#12345)" # Capture all calls to MYCALL and not from YMCALL or ID 12345 

Notifications

To create notification, for example on the mobile phone, the notify platform can be used. (See details) Following automation will create notification containing information about fired triggers and call.

alias: BrandMeister Alert
description: ""
trigger:
  - platform: event
    event_type: bm_feed/call
    event_data: {}
condition: []
action:
  - service: notify.notify
    data:
      title: BrandMeister Call
      message: >
        {% for t in trigger.event.data.triggers %}{{ t|e }}{{ " " }}{% endfor %}

        {{ trigger.event.data.caller.callsign }}({{
        trigger.event.data.caller.id}}) to {{ trigger.event.data.callee.callsign
        }}({% if trigger.event.data.callee.is_group %}TG{% endif %}{{
        trigger.event.data.callee.id }})
      data:
        notification_icon: "mdi:radio-handheld"
        when: {{ now().strftime('%s') }}
        group: "BrandMeister"
mode: single

TODO

  • Replace dictionary mayhem with more sophisticated type and logic system.
  • Add sensors or different entities representing filter results.
  • Create config flow.

About

BrandMeister Event Feed for Home Assistant

Topics

Resources

Stars

Watchers

Forks

Languages