Skip to content

[bug] home_control action with a separator run ("turn off", "turn - off") silently fails to actuate #727

Description

@ultrahighsuper

Summary

canon_home_control_action normalizes a model/router action verb with raw.trim().to_lowercase().replace([' ', '-'], "_"). That maps each separator 1:1, so a run of separators becomes a run of underscores — "turn off""turn__off" — which matches no real HOME_CONTROL_ACTIONS verb. The dispatch is rejected and the device is never actuated (the light stays on). This is the same failure mode #400 fixed for single spaces, still open for separator runs.

Steps to reproduce

Dispatch home_control with an action verb carrying a doubled/spaced separator (small models and STT-derived text routinely produce these):

  • home_control{entity:"kitchen light", action:"turn off"} (double space)
  • action:"turn - off" (spaced hyphen)
  • action:"turn off" (tab)

Expected

turn off → canonical turn_offlight.kitchen_lights goes on → off (same as turn off).

Actual

canon_home_control_action("turn off") returns None → the runtime rejects the action → no actuation. "turn off" (single space) works; the double-space twin silently does nothing.

Notes

Whole class: any run of whitespace / - / _ between the verb tokens. Fix is to fold separator runs to a single _ instead of replacing 1:1. crates/genie-core/src/tools/home_action.rs.

Hardware

Non-Jetson (x86_64 dev / cross-build host)

GenieClaw version / commit

2ad90f4 (main)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions