File tree Expand file tree Collapse file tree
custom_components/roborock_custom_map Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ def __init__(
111111
112112 self .config_entry = config_entry
113113 self .map_flag = map_flag
114+ self .rotation_key = f"{ coordinator .duid_slug } _{ map_flag } "
114115 self ._home_trait = home_trait
115116
116117 if not map_name :
@@ -145,7 +146,7 @@ async def async_added_to_hass(self) -> None:
145146 self .async_on_remove (
146147 async_dispatcher_connect (
147148 self .hass ,
148- f"{ SIGNAL_ROTATION_CHANGED } _{ self .config_entry .entry_id } _{ self .map_flag } " ,
149+ f"{ SIGNAL_ROTATION_CHANGED } _{ self .config_entry .entry_id } _{ self .rotation_key } " ,
149150 self ._handle_rotation_changed ,
150151 )
151152 )
@@ -184,7 +185,7 @@ def _get_rotation(self) -> int:
184185 self .hass .data .get (DOMAIN , {})
185186 .get (self .config_entry .entry_id , {})
186187 .get (CONF_MAP_ROTATION , {})
187- .get (self .map_flag , DEFAULT_MAP_ROTATION )
188+ .get (self .rotation_key , DEFAULT_MAP_ROTATION )
188189 )
189190
190191 if rotation not in MAP_ROTATION_OPTIONS :
You can’t perform that action at this time.
0 commit comments