Skip to content

[Feature]: Add current_room sensor from working_status broadcast #21

@clawtom

Description

@clawtom

Summary

The working_status broadcast includes a room_id field (field 6) that tracks which room the robot is actively cleaning. This field changes in real time as the robot moves between rooms, and it is what the Narwal app uses to display the current room. The integration currently receives this value but does not expose it as a sensor.

Evidence

Captured from a Narwal Flow 2 (firmware v01.07.16.01) during a live cleaning run — 177 messages over 60 seconds:

  • Capture 1 (45% progress): working_status field 6 = 4 → confirmed Corridor
  • Capture 2 (64% progress): working_status field 6 = 1 → confirmed Living Room

The value changes as the robot moves between rooms, matching exactly what the Narwal app displays.

Correction from original issue description: Field 12 in display_map is not the active room list — it contains room boundary polylines (per-room path data with cleaning zone metadata). The current room is exclusively in working_status field 6.

Implementation

  1. Parse field 6 from working_status in coordinator.py and store as current_room_id: int | None on NarwalState
  2. Look up the room name using the room map returned by get_map (room ID → name already available)
  3. Expose as a SensorEntity in sensor.py with string value (e.g. "Living Room", "Bathroom 1")

Related

The working_status field 5 (room job list) is a separate structure — it contains all rooms scheduled for the current cleaning job with per-room completion flags. That is distinct from field 6, which tracks current physical location only.

Tested on

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestflow-2Narwal Flow 2 (QxMSPG6VSO) specific behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions