docs: HA Google Home config deployed + verified (correct entity id)
Deployed script.print_daily_briefing (scripts.yaml) and exposed it in google_assistant.entity_config on VM HA .146; ha core check passed, restarted, request_sync OK. Verified end-to-end: HA script -> MQTT -> bridge -> printed. Corrects the button entity id to button.pos_briefing_print_daily_briefing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+38
-44
@@ -1,64 +1,63 @@
|
|||||||
# HA + Google Home setup — POS Briefing button
|
# HA + Google Home setup — POS Briefing button (DEPLOYED 2026-06-07)
|
||||||
|
|
||||||
The MQTT bridge (`pos-briefing-mqtt.service` on steel141) auto-creates an HA
|
Status: **deployed and verified end-to-end** on VM HA (`192.168.0.146`, HAOS 2026.2.3),
|
||||||
button via MQTT discovery. Google's `google_assistant` integration does not
|
except the final Google-app tap (yours to try).
|
||||||
support `button` entities, so we wrap the button in a `script` (scripts expose to
|
|
||||||
Google as a **Scene** = a tappable button in the Home app).
|
|
||||||
|
|
||||||
Chain: **Google Home tap → HA script → `button.press` → MQTT `posbriefing/button/press`
|
Chain: **Google Home tap → HA `script.print_daily_briefing` → `button.press` →
|
||||||
→ bridge runs `pos_briefing.py` → prints on the TM-m30.**
|
MQTT `posbriefing/button/press` (broker CT 301) → `pos-briefing-mqtt.service` on
|
||||||
|
steel141 → `pos_briefing.py` → printer (by MAC) → TM-m30.**
|
||||||
|
|
||||||
## 0. Confirm the entity exists
|
Google's `google_assistant` integration doesn't support `button` entities, so the
|
||||||
Settings → Devices & Services → **MQTT** → device **POS Briefing**. You should see
|
MQTT-discovery button is wrapped in a `script`, which Google exposes as a **Scene**
|
||||||
button **Print Daily Briefing** (entity `button.print_daily_briefing`). Pressing it
|
(a tappable button in the Home app).
|
||||||
in HA should print a receipt. (Status is published on `posbriefing/status`:
|
|
||||||
`idle`/`printing`/`ok`/`error:<msg>`; availability on `posbriefing/availability`.)
|
|
||||||
|
|
||||||
If the entity id differs, use whatever HA shows in the script below.
|
## What was deployed (VM HA `/config`, backed up to `/config/.backup/`)
|
||||||
|
|
||||||
## 1. Add the script
|
1. **`scripts.yaml`** — the script (note the real discovery entity id, which HA
|
||||||
Settings → Automations & Scenes → **Scripts** → (top-right) Edit in YAML, or paste
|
prefixed with the device name):
|
||||||
into `scripts.yaml`:
|
|
||||||
```yaml
|
```yaml
|
||||||
print_daily_briefing:
|
print_daily_briefing:
|
||||||
alias: Print Daily Briefing
|
alias: Print Daily Briefing
|
||||||
sequence:
|
sequence:
|
||||||
- service: button.press
|
- action: button.press
|
||||||
target:
|
target:
|
||||||
entity_id: button.print_daily_briefing
|
entity_id: button.pos_briefing_print_daily_briefing
|
||||||
mode: single
|
mode: single
|
||||||
```
|
```
|
||||||
|
2. **`configuration.yaml`** — `script.print_daily_briefing` added to the existing
|
||||||
## 2. Expose the script to Google
|
`google_assistant.entity_config` (alongside the LG TV + projector; nothing else
|
||||||
Add to the SAME `google_assistant:` block that already exposes the LG TV switch
|
touched):
|
||||||
(keep your existing `project_id` / `service_account` lines):
|
|
||||||
```yaml
|
```yaml
|
||||||
google_assistant:
|
google_assistant:
|
||||||
project_id: <your existing project_id>
|
# ...existing project_id / service_account / report_state / expose_by_default...
|
||||||
service_account: !include <your existing service_account file>
|
|
||||||
report_state: true
|
|
||||||
exposed_domains:
|
|
||||||
- switch
|
|
||||||
entity_config:
|
entity_config:
|
||||||
script.print_daily_briefing:
|
script.print_daily_briefing:
|
||||||
name: Print Daily Briefing
|
name: Print Daily Briefing
|
||||||
expose: true
|
expose: true
|
||||||
|
# switch.big_tv_lg_tv ... media_player.mitsubishi_projector ... (unchanged)
|
||||||
```
|
```
|
||||||
Reload (Developer Tools → YAML → "Google Assistant" or restart HA).
|
3. `ha core check` passed → `ha core restart` → `google_assistant.request_sync` (HTTP 200).
|
||||||
|
|
||||||
Reminders from the lgtv 2026-06-06 linking (already satisfied for your setup):
|
## Verified
|
||||||
manual `google_assistant` integration (not Nabu Casa); account-linking scopes must
|
- `script.print_daily_briefing` loaded in HA (state `off`, "Print Daily Briefing").
|
||||||
include `email` + `name`; the **"HTTP basic auth header" checkbox must be OFF**; the
|
- Firing the script via HA API → bridge logged `Received: PRESS` → `Running briefing...`
|
||||||
Google **Test** must be activated by the same account used in the Home app
|
→ `Briefing printed OK` → **physical receipt printed**.
|
||||||
(slingshooter08). The GCP OAuth consent screen is unrelated to smart-home linking —
|
- MQTT discovery button is `button.pos_briefing_print_daily_briefing` (Settings →
|
||||||
don't touch it.
|
Devices → MQTT → **POS Briefing**).
|
||||||
|
|
||||||
## 3. Sync to Google Home
|
## Your only remaining step
|
||||||
Say "Hey Google, sync my devices" (or re-run device setup in the Home app). The
|
Open the Google Home app (account `slingshooter08`). **Print Daily Briefing** should
|
||||||
button appears as **Print Daily Briefing**; tapping it prints the receipt.
|
appear as a control (after the request_sync; if not, say "Hey Google, sync my
|
||||||
|
devices"). Tap it → receipt prints. Optionally assign it a room / rename.
|
||||||
|
|
||||||
## Optional: surface print status in HA
|
## Notes
|
||||||
Add an MQTT sensor (configuration.yaml) if you want to see the last result:
|
- A print takes ~1–2 min (gemma4:26b summarization). The button/scene returns
|
||||||
|
immediately; `posbriefing/status` goes `printing` → `ok`. A second press while one
|
||||||
|
is in flight is ignored (debounced) — no double prints.
|
||||||
|
- Google-linking invariants (from lgtv 2026-06-06, already satisfied — don't re-fix):
|
||||||
|
manual `google_assistant` integration; account-linking scopes include `email`+`name`;
|
||||||
|
"HTTP basic auth header" checkbox OFF; the GCP OAuth consent screen is unrelated.
|
||||||
|
- Optional MQTT status sensor (configuration.yaml) if you want last-result visibility:
|
||||||
```yaml
|
```yaml
|
||||||
mqtt:
|
mqtt:
|
||||||
sensor:
|
sensor:
|
||||||
@@ -66,8 +65,3 @@ mqtt:
|
|||||||
state_topic: "posbriefing/status"
|
state_topic: "posbriefing/status"
|
||||||
availability_topic: "posbriefing/availability"
|
availability_topic: "posbriefing/availability"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Notes
|
|
||||||
- A print takes ~1–2 min (gemma4:26b summarization). The button returns immediately;
|
|
||||||
watch `posbriefing/status` go `printing` → `ok`.
|
|
||||||
- A second press while one is in flight is ignored (debounced) — no double prints.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user