Skip to content

Satellite Custom Device Configuration

Donny F edited this page Mar 8, 2024 · 5 revisions

WORK IN PROGRESS

In planning for multiple devices, both visual and audio only, I have created a custom device for the Android device. Each additional device would have a separate configuration. This allows for setting properties for each device that may have a unique condition for that device (eg night mode for a device in a dark room during the day). These devices are set up in YAML as a template device in configuration.yaml:

template:
  - sensor:
    - name: AssistSat_ViewLR
      state: ""
      attributes:
        mode: "normal"
        view_timeout: "20"
        title: ""
        message: ""
        message_font_size: "3vw"
        image: ""
        timer: ""
        alarm: ""
        cycle_view: ""

Definitions:

  • name: Device name (eg AssistSat_ViewLR = Assist Satellite: View Living Room)
  • state: required
  • mode: Used to control actions based on conditions (current modes "normal", "music", "night", "lock", "cycle". Default "normal")
  • view_timeout: Amount of time (seconds) before switching views as controlled by mode (Default 20 seconds)
  • title: Text for displaying title of multiuse cards
  • message: Blob text for displaying to informational views
  • message_font_size: Text containing size of font to be used in message for informational views (Default "3vw")
  • image: Text containing image path for display on informational views
  • timer: Array containing timer helpers associated with all Assist devices Planned
  • alarm: Array containing alarm helpers associated with all Assist devices Planned
  • cycle_view: Array containing view names to cycle through using view_timeout when in "cycle" mode Planned

Unfortunately, I am not smart enough to know how to set these attributes other than using a python script.

For installation of this script see:

Once installed, automations with service calls like this can be used:

- service: python_script.set_state
  data:
    entity_id: sensor.assistsat_viewlr
    mode: music

I would love if someone can tell me a better way to do this

More information coming. Please be patient as the wiki gets populated