Commit 081e394
Fix Homebridge 2.0 crash on TV accessories (hap.Categories path) (#778)
* v4.4.20 Release (#765)
### Fixed
- Fixed ESLint support and applied some code fixes
### Changed
- Stopped device temperature checks when they're not applicable (MQTT, File, W1)
* Fix Homebridge 2.0 crash on TV accessories (hap.Categories path)
In hap-nodejs v1 (shipped with Homebridge 2.0) the Categories enum is
exported at hap.Categories rather than hap.Accessory.Categories. The
old path is undefined in v1, so platform.js threw
TypeError: Cannot read properties of undefined (reading 'TELEVISION')
at startup for any config containing a `tv` accessory. Switch all four
references in platform.js to hap.Categories. The new path also exists
in hap-nodejs v0.x, so this remains compatible with Homebridge 1.x and
no version branching is needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Cameron <32912464+kiwi-cam@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3d3a0cb commit 081e394
1 file changed
Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments