@@ -783,7 +783,7 @@ def __init__(
783783 domain , ident = next (iter (cast (set [tuple [str , str ]], base_identifiers )))
784784
785785 di_dict : dict [str , Any ] = {
786- "identifiers" : {(domain , f" { ident } _head_ { self ._head } " )},
786+ "identifiers" : {(domain , ident , f"head_ { self ._head } " )},
787787 "name" : f"{ self ._device .title } head { self ._head } " ,
788788 }
789789
@@ -833,8 +833,8 @@ async def async_added_to_hass(self) -> None:
833833 base_identifiers = base_di .get ("identifiers" ) or {(DOMAIN , self ._device .serial )}
834834 domain , ident = next (iter (cast (set [tuple [str , str ]], base_identifiers )))
835835 via_device = base_di .get ("via_device" )
836- di : DeviceInfo = {
837- "identifiers" : {(domain , f" { ident } _head_ { head } " )},
836+ di_dict : dict [ str , Any ] = {
837+ "identifiers" : {(domain , ident , f"head_ { head } " )},
838838 "name" : f"{ self ._device .title } head { head } " ,
839839 "manufacturer" : base_di .get ("manufacturer" ),
840840 "model" : base_di .get ("model" ),
@@ -843,8 +843,8 @@ async def async_added_to_hass(self) -> None:
843843 "sw_version" : base_di .get ("sw_version" ),
844844 }
845845 if via_device is not None :
846- di ["via_device" ] = via_device
847- self ._attr_device_info = di
846+ di_dict ["via_device" ] = via_device
847+ self ._attr_device_info = cast ( DeviceInfo , di_dict )
848848
849849
850850# REEFRUN
0 commit comments