Repository navigation
Conversation
|
@SlyWombat, thanks for the detailed report. This PR implements the NY rule from your issue. If you can test the branch (https://github.com/Varshavia/localthings/tree/fix/ny-fuel-gas), there are two things I can't check without the hardware: several burners lit at the same time, and whether the old raw cooktop_monitoring entity is left behind in the entity registry. |
|
Tested on the real NY9100DW. I applied only this PR's Entities after the restart
Two burners lit together (front-left + back-left, twice, from the HA recorder):
Before this I'd checked each burner alone (1/2/4/8/16, as in #767), so bits 0–4 are each confirmed. Two at once now sums correctly too. I haven't tested more than two at once. I've rolled back to v0.36.0 for now and will pick this up from a release. Thanks for the quick turnaround! |
What is wrong
The per-burner entities from #450 are gated on a
Fuel_Gastoken in/mode/vs/0options. The NY9100DW/AA (TP1X_DA-KS-RANGE-0102X) reports noFuel_*token at all, so it only gets the rawcooktop_monitoringdiagnostic.The issue's data shows its mask matches the bit map already verified on the gas NX60T8311SS: with each burner lit alone,
cooktopMonitoringread 1, 2, 4, 8 and 16 for front-left, back-left, center, back-right and front-right.Fixes #767
The change
_fuel_is_gas()inregistry/capabilities/range.py:Fuel_*token is present, behavior is unchanged: gas only when it isFuel_Gas.Fuel_*token is present, the board counts as gas only when itsDeviceType_value starts withNY.Evidence
New test file:
tests/test_range_ny9100dw_capabilities.py, a minimal synthetic resource set built from the values posted in the issue.test_range_nx60t8311ss_capabilities.py, after the fixThe 6 failures before the fix were the five single-burner cases and the all-off case:
cooktop_monitoringstayed raw andactive_burnersdid not exist. The 2 that passed before the fix are guards that must not change (NY withFuel_Electric, and NE8300D).ruff format --check,ruff checkandty checkpass oncustom_componentsandtests(ruff 0.16.1, ty 0.0.65).What the local test run does and does not cover
These results are from Windows on Python 3.13, not CI's Python 3.14. Home Assistant's pytest plugin cannot start on Windows (it imports
fcntl), so the suite ran with-p no:homeassistantandPYTHONUTF8=1.lru-dictwas 1.4.1 instead of Home Assistant's pinned 1.3.0, because 1.3.0 has no Windows wheel for Python 3.13.upstream/mainThe 8 extra passes are the new tests, and the set of erroring tests is identical on both trees. All 1192 errors are missing Home Assistant fixtures (
hass,enable_custom_integrations,recorder_mock), so those tests did not run locally. They include the config flow and coordinator tests. CI needs to confirm them.Boards intentionally not touched
Fuel_*token: stays raw. There is no evidence for this case, andtest_board_without_fuel_token_gets_raw_value_onlykeeps passing.BurnerOnAlter_Onis not used as a signal: the electric NE8300D fixture carries it too. A test covers this.Fuel_Electric: stay raw. The model prefix only fills in for a missing token and never overrides a reported one. A test covers this.What only the reporter can verify on the real device
active_burnerssensor and the fivecooktop_burner_Nbinary sensors appear after updating, and each follows the matching physical burner.cooktop_monitoringentity. Decoded boards no longer get it, so it may be left behind in the entity registry.Assumptions
NYprefix indicates a gas cooktop. This comes from the model-number note in the issue and has not been checked against any other NY board.DeviceType_follows the retail model prefix. It does not always match the retail model: the NX60T8311SS reportsNX9302T-.