Input text box on dashboard and automation for use with openhasp message box

Text box on a Home Assistant dashboard.
For use of sending text to wall panels by imputing text on a HA dashboard input text box or using “input text: set” as a action in a automation.
openhasp
Or
Openhasp HA community forum page


Using “input text: set” as a action in a automation.

I love using our panels and the feature we get the most use of is the “message box” { I call them pop ups } for notifications and reminders. They Come in handy because when Barbara is working she does not pay much attention to her phone.
Turning on backlight and A pop up on the openhasp screen between two of her computer monitors gets her attention.

How to:

Using Helpers create a input Text box
{input_text.HA_panel_popup_text_box}
to put on HA dash board So I can easily display a pop up message on All dash boards. The automation then deletes the Message box when the Text box is cleared.

First Create A text box using Yaml or Helpers and add to a Dashboard.


Automation:
This automation will use the “text” from the text box and Publish to panel(s) and turn on the back light to all panels.
In the payload_template you will see

 {"page":0,"id":75,"obj":"msgbox","bg_color":"white","text_color":"Red","text":"
        {{ states("input_text.ha_panel_popup_text_box") }}
        ","options":["Close"]}

,Page"0"` is all pages and “id”:75 is the ID of the Message box so if you have other message boxes give them another ID so the will not be overwritten or cleared by this automation.

In the last part of the automation will Delete the message box (popup) when the Text box is empty

  - condition: state
    entity_id: input_text.ha_panel_popup_text_box
    state: ""
  - service: mqtt.publish
    data:
      topic: hasp/plates/command/p0b75.delete

FULL AUTOMATION

alias: Openhasp POPup text box
description: >-
  display popup on all openhasp panels the Dashboard text box data. Clear popup
  if text box is Empty or cleared. popupID#75
trigger:
  - platform: state
    entity_id:
      - input_text.ha_panel_popup_text_box
    id: text
    enabled: true
condition: []
action:
  - service: mqtt.publish
    data:
      topic: hasp/plates/command/jsonl
      payload_template: >-
        {"page":0,"id":75,"obj":"msgbox","bg_color":"white","text_color":"Red","text":"
            {{ states("input_text.ha_panel_popup_text_box") }} ","options":["Close"]}
  - type: turn_on
    device_id: 88b53314416b4ce885e73c349b11de1b
    entity_id: light.desk1_backlight
    domain: light
    brightness_pct: 100
  - type: turn_on
    device_id: ff2aa76f6ac729f1e9e243fa22ce23e1
    entity_id: light.plate35_backlight
    domain: light
    brightness_pct: 100
  - type: turn_on
    device_id: e8173c788aa326e57adbc645b2d954c8
    entity_id: light.desk_backlight
    domain: light
  - condition: state
    entity_id: input_text.ha_panel_popup_text_box
    state: ""
  - service: mqtt.publish
    data:
      topic: hasp/plates/command/p0b75.delete
mode: single

Automation to automatically Clear Text box in Homeassistant when someone Closes message box popup.

alias: clear popup box
description: >-
  Deletes Message box when "Close" is selected on any Openhasp Panel message
  box.
trigger:
  - platform: mqtt
    topic: hasp/desk1/state/p0b75
    payload: "{\"event\":\"up\",\"val\":0,\"text\":\"Close\"}"
  - platform: mqtt
    topic: hasp/desk/state/p0b75
    payload: "{\"event\":\"up\",\"val\":0,\"text\":\"Close\"}"
  - platform: mqtt
    topic: hasp/plate35/state/p0b75
    payload: "{\"event\":\"up\",\"val\":0,\"text\":\"Close\"}"
condition: []
action:
  - service: input_text.set_value
    data:
      value: ""
    target:
      entity_id: input_text.ha_panel_popup_text_box
mode: single

more popups

Here is a little more about my openhasp wall panel setups
Openhasp on a Lanbon L8 and WT32-SC01 Plus