Add GAS_COOKTOP support - #491
Conversation
ErdApplianceType.GAS_COOKTOP = "0D" has existed in gehomesdk since 2021 but has never been mapped to a device handler. Result: standalone gas cooktops authenticate, appear in the appliance list, and receive ERD updates, but fall through to the inert ApplianceApi base and produce zero entities. Standalone gas cooktops use the feature flag DEVICE_GATEWAY_V1_BLE_ADVERTISE_ONLY_SENSOR (BLE-to-cloud gateway rather than native WiFi), implement a reduced ERD surface (no per-burner detail, no COOKTOP_STATUS_EXT), and reuse familiar hex codes with different byte semantics. Three of the five ERDs we need (0x5020, 0x5105, 0x5520) are registered in gehomesdk's ErdCode enum with converters that produce oven/hood-shaped objects meaningless on this appliance. We read their raw bytes via appliance.get_raw_erd_value() and decode per the gas-cooktop schema. Entities exposed (reverse-engineered from a Monogram ZGU36ESLSS): - Cooktop On (binary_sensor, 0x5520 byte 0) - Locked (binary_sensor, LOCK class, 0x5900; read-only, see below) - Kitchen Timer (number, writable 0-599 min, 0x5105) - Kitchen Timer Alarm (binary_sensor, SOUND class, 0x5020 byte 0) - Cooking Minutes (sensor, total_increasing, min uom, 0x5902) NOT implemented: writable lock. Brillion rejects gehomesdk's writes to 0x5900 with 400 "erd is not writable" even though the SmartHQ app can lock. Per-OAuth-client-id writability policy; lock stays a read-only BinarySensor. SmartHQ's UI is also one-way (can lock, can't remotely unlock) for safety. Requires gehomesdk>=2026.5.0, which adds GeAppliance.get_raw_erd_value() (simbaja/gehome#111, merged 2026-05-17 and released in gehomesdk 2026.5.0). manifest.json is bumped accordingly.
|
Updated and ready for review. |
|
I went in a different direction for this, I want to avoid having raw ERD manipulation in the integration itself. I did integrate the ability to get the raw values though, so that you can continue using your fork if you want to do so. Instead of the changes you propose here, I've done the following:
The changes are in the latest pre-release 2026.5.0-dev0 or in the 2026.5.0-working branch, would love for your feedback on the implementation and for any further enhancements to support your device. |
Problem
ErdApplianceType.GAS_COOKTOP = "0D"has existed in gehomesdk since 2021 but has never been mapped to a device handler indevices/__init__.py'sknown_typesdict. Standalone gas cooktops authenticate against GE's cloud, appear in the appliance list, and receive ERD updates — butget_appliance_api_type()returns the inertApplianceApibase and zero entities get created.Sibling reports, still open:
Why this appliance type is tricky
Standalone gas cooktops use the
DEVICE_GATEWAY_V1_BLE_ADVERTISE_ONLY_SENSORfeature flag (BLE-to-cloud gateway rather than native WiFi). In practice they implement a reduced ERD surface and reuse familiar hex codes with different byte semantics:HOOD_TIMERUPPER_OVEN_KITCHEN_TIMERCOOKTOP_STATUSFor the registered codes, the existing converter decodes the raw hex into a typed Python object (
timedelta,CooktopStatus, ...) that's meaningless on a gas cooktop. The newGeAppliance.get_raw_erd_value()from simbaja/gehome#111 is the escape hatch — we read the raw bytes and decode per the gas-cooktop schema.Fix
Adds
devices/gas_cooktop.pywithGasCooktopApiand its entity classes, plus a one-line addition to theknown_typesdispatcher.Entities (reverse-engineered from a Monogram ZGU36ESLSS by toggling each feature in the SmartHQ app and diffing
publish#erdevents):binary_sensor, POWER class,0x5520byte 0 (00all off,01any on).binary_sensor, LOCK class,0x5900(01=unlocked,02=transitioning,03=locked). Read-only; see "Not included" below.number, 0–599 min, step 1,NumberMode.BOX, uom=min. Writable — tested end-to-end vianumber.set_valueservice against live appliance.binary_sensor, SOUND class,0x5020byte 0 (01=beeping, auto-clears on user ack).sensor, uom=min,state_class=TOTAL_INCREASING,0x5902. Ticks up once per minute while any burner is on, resets to 0 when all burners turn off; SmartHQ's 1-hour "cooktop still on" alert fires when this reaches 60.Kitchen timer writes bypass the SDK encoder because
UPPER_OVEN_KITCHEN_TIMER's upstream encoder expects atimedeltain seconds, not raw big-endian minutes. We callappliance.client.async_set_erd_value()directly with a hand-encoded 2-byte hex string.Not included
Writable lock. Brillion rejects gehomesdk's writes to
0x5900with400 "erd is not writable"— even though the SmartHQ app can successfully lock the cooktop. Investigation with DEBUG logging confirmed:0x5900directly (no separate command ERD), visible viapublish#erd:01 → 02 → 03.client_idis whitelisted for this ERD, gehomesdk's isn't.Lock stays a read-only
BinarySensor. Matches SmartHQ's own UI, which is one-way too (lock yes, remote unlock no) for safety.Testing
Local backport of this change has been running against a live Monogram ZGU36ESLSS for over a month with no issues. All five entities verified:
number.set_valueservice: physical display mirrors the written value within ~6s;0clears it.Cooking Minutesvalidated across a session where its value correlated with burner-on time and reset when burners turned off.Open questions for cross-model robustness
01/02/03enum might be Monogram-specific. Happy to add a fallback that treats any non-01as "locked" if reports diverge._max_minutes = 599) is the obvious knob.