genmon/scripts
Jonathan Tubb 2f4361fb3d Refactor genhomeassistant.py to load sensor definitions from JSON
Move hardcoded entity definitions (sensors, binary sensors, buttons,
switches, selects, numbers) to external JSON files in data/homeassistant/.
This follows the established pattern from gensnmp.py and allows for:

- Easier customization of entity definitions without code changes
- Controller-specific entity overrides via separate JSON files
- User-defined customizations via optional userdefined.json
- Hardcoded fallback if JSON files are missing

New files:
- data/homeassistant/base.json: Base entity definitions for all controllers
- data/homeassistant/generac_evo_nexus.json: Evolution/Nexus specific
- data/homeassistant/h_100.json: H-100/G-Panel specific
- data/homeassistant/powerzone.json: PowerZone specific
- data/homeassistant/custom.json: Custom controller specific
- scripts/migrate_ha_definitions.py: One-time migration script

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:28:14 -05:00
..
migrate_ha_definitions.py Refactor genhomeassistant.py to load sensor definitions from JSON 2026-01-19 15:28:14 -05:00