Edt: Try the official Google Cast before you use this method. It’s easier, has less issues, and has official support by Home Assistant.
Edit: check out GitHub - chiahsing/nest_hub: Home Assistant pyscript for using Nest Hub as a dashboard for the pyscript version.
Not sure why this approache is not mentioned enough. When I searched online, the most mentioned approach is to use catt or Nabu Casa. But I found that using DashCast add-on (GitHub - AlexxIT/DashCast: DashCast component for Home Assistant) is even simpler. My setup:
Device: Google Nest Hub (2nd gen)
Add-on: DashCast
configuration.yaml
homeassistant:
auth_providers:
- type: homeassistant
- type: trusted_networks
trusted_networks:
- 10.1.1.5 # my Google Nest Hub IP
trusted_users:
10.1.1.5: <user id>
allow_bypass_login: true
Script:
alias: Cast Dashboard
sequence:
- choose:
- conditions:
- condition: template
value_template: "{{ state_attr('media_player.nesthub', 'app_name') != 'DashCast' }}"
sequence:
- service: media_player.volume_set
data:
volume_level: 0
target:
entity_id: media_player.nesthub
- service: dash_cast.load_url
data:
entity_id: media_player.nesthub
url: http://url/to/dashboard
force: true
The script cast the URL to the nest hub if the nest hub is not already running DashCast.
And to make it even more reliable, add an automation:
alias: Recast Dashboard
description: ""
trigger:
- platform: template
value_template: "{{ state_attr('media_player.nesthub', 'app_name') != 'DashCast' }}"
condition: []
action:
- service: script.1662992499922 # The script above
data: {}
mode: single
This automation is useful for using the device as a dedicated dashboard and does nothing else. The automation calls the script whenever the device is not showing the dashboard. Basically, you will get a sub-second response time whenever the device is accidentally swiped back to the idle page or being used for anything else.
I also have a couple of useful custom components installed: Kiosk Mode ( GitHub - maykar/kiosk-mode: 🙈 Hides the Home Assistant header and/or sidebar), ha-catt-fix (GitHub - swiergot/ha-catt-fix: A solution for the timeout issue when casting Home Assistant using CATT), Swipe Navigation (GitHub - zanna-37/hass-swipe-navigation: ↔️ Swipe through Home Assistant Dashboard views on mobile.). These together all make the Google Nest Hub dashboard even better.
Edit: See the comment below for a pyscript verison.