Home Assistant: add features config (heating/integrateddevice) (#32288)

This commit is contained in:
github-actions[bot] 2026-07-30 06:50:44 +00:00 • committed by GitHub
parent c9c3b3b738
commit 838773b2ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,6 +13,7 @@ import (
// HomeAssistant charger implementation // HomeAssistant charger implementation
type HomeAssistant struct { type HomeAssistant struct {
*embed
implement.Caps implement.Caps
conn *homeassistant.Connection conn *homeassistant.Connection
status string status string
@ -29,6 +30,7 @@ func init() {
// NewHomeAssistantFromConfig creates a HomeAssistant charger from generic config // NewHomeAssistantFromConfig creates a HomeAssistant charger from generic config
func NewHomeAssistantFromConfig(other map[string]any) (api.Charger, error) { func NewHomeAssistantFromConfig(other map[string]any) (api.Charger, error) {
var cc struct { var cc struct {
embed `mapstructure:",squash"`
homeassistant.Config `mapstructure:",squash"` homeassistant.Config `mapstructure:",squash"`
Status string // required - sensor for charge status Status string // required - sensor for charge status
StatusA string // optional - custom states mapped to status A StatusA string // optional - custom states mapped to status A
@ -74,6 +76,7 @@ func NewHomeAssistantFromConfig(other map[string]any) (api.Charger, error) {
} }
c := &HomeAssistant{ c := &HomeAssistant{
embed: &cc.embed,
Caps: implement.New(), Caps: implement.New(),
conn: conn, conn: conn,
status: cc.Status, status: cc.Status,