Skip to content

Optional Components

Donny F edited this page Apr 17, 2024 · 10 revisions

View Assist is a collection of various tools that tie into the Assist voice assistant. The components on this page are optional but are needed if you plan to use some of the more advanced views and automations.

Satellite Custom Device Configuration

In planning for multiple devices, both visual and audio only, I have created a custom device for the View Assist devices. 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). These devices are set up in YAML as a template device in configuration.yaml:

template:
  - sensor:
    - name: AssistSat_ViewLR
      state: ""
      attributes:
        type: view_audio
        mode: "normal"
        mic_device: "sensor.firehd_7_stt"
        mediaplayer_device: "media_player.tabletfullkiosk"
        display_device: "sensor.thinksmart_lr_browser_path"
        view_timeout: "20"
        title: ""
        message: ""
        message_font_size: "3vw"
        image: ""
        timer: ""
        alarm: ""
        cycle_view: ""
        do_not_disturb: false

Definitions:

  • name: Device name (eg AssistSat_ViewLR = Assist Satellite: View Living Room)
  • state: Required
  • type: Used to determine a/v capabilities ("view_audio", "view_only", "audio_only". Default "view_audio")
  • mic_device: Used to assign microphone to View Assist device
  • mediaplayer_device: Used to assign the media player used for View Assist audio playback
  • display_device: Used to determine the correct Browser Mod instance to use for display
  • mode: Used to control actions based on conditions (current modes "normal", "music", "night", "hold", "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: List containing view names to cycle through using view_timeout when in "cycle" mode (must be in Python list format eg "[ 'weather', 'frontcamera' ]")
  • dnd: Do not disturb mode. Do not broadcast or play sounds when in DND mode (Default "false")

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

Python Script for setting sensor values

hass_py_set_state is a Home Assistant Python Script to force set an entity state . This is used to set values stored in the custom configuration device above. Click the link and follow the installation procedure


Wikipedia Search

The Wikipedia search function is accomplished by using REST API . Note that this is very basic and contains no error checking. To add this functionality, edit your configuration.yaml to include:

rest_command:
  wiki_how:
    url: "https://en.wikipedia.org/api/rest_v1/page/summary/{{ name }}?redirect=true"

Restart Home Assistant to make this available. You will also need to then have the Information Picture Card as a view and then you can use THIS custom sentence

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