Skip to content

Commit 9831be5

Browse files
committed
Trigger solar sensor detection if from reconfigure
1 parent f537c0c commit 9831be5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

custom_components/powersensor/sensor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ async def handle_role_update(mac_address: str, new_role: str):
7878
if new_role == 'solar':
7979
new_data['with_solar'] = True # Remember for next time we start
8080
persist_entry = True
81+
# In case the role change was via a reconfigure
82+
async_dispatcher_send(hass, SOLAR_SENSOR_DETECTED_SIGNAL)
8183

8284
if persist_entry:
8385
hass.config_entries.async_update_entry(entry, data=new_data)

0 commit comments

Comments
 (0)