Skip to content

v0.5.0

Choose a tag to compare

@volschin volschin released this 02 Mar 20:50

HA Quality Scale Best Practices (Bronze–Gold)

Bronze

  • Use entry.runtime_data instead of hass.data[DOMAIN] for type-safe runtime data access

Silver

  • Add PARALLEL_UPDATES = 0 for coordinator-based sensor updates
  • Pass config_entry to DataUpdateCoordinator.__init__()

Gold

  • Use DeviceInfo object instead of plain dict
  • Add EntityCategory.DIAGNOSTIC for status, event, and system info sensors
  • Add suggested_display_precision per sensor based on scale factor
  • Use ConfigFlowResult type instead of deprecated FlowResult
  • Use self.config_entry in OptionsFlow (no constructor parameter)
  • Use Platform.SENSOR enum instead of string literal
  • Add integration_type: "device" to manifest.json
  • Add reconfiguration flow (async_step_reconfigure) for changing IP/serial post-setup
  • Modernize typing: Dict/Optionaldict/X | None with from __future__ import annotations