File tree Expand file tree Collapse file tree 3 files changed +27
-8
lines changed
custom_components/sonnenbatterie Expand file tree Collapse file tree 3 files changed +27
-8
lines changed Original file line number Diff line number Diff line change 1+ name : Validate
2+
3+ on :
4+ push :
5+ pull_request :
6+ schedule :
7+ - cron : " 0 1 * * *"
8+ workflow_dispatch :
9+
10+ jobs :
11+ validate-hacs :
12+ runs-on : " ubuntu-latest"
13+ steps :
14+ - name : HACS validation
15+ uses : " hacs/action@main"
16+ with :
17+ category : " integration"
Original file line number Diff line number Diff line change @@ -76,30 +76,31 @@ async def async_step_reconfigure(self, user_input):
7676 {
7777 vol .Required (
7878 CONF_IP_ADDRESS ,
79- default = entry .data [ CONF_IP_ADDRESS ] or None
79+ default = entry .data . get ( CONF_IP_ADDRESS ) or None
8080 ): str ,
8181 vol .Required (
8282 CONF_USERNAME ,
83- default = entry .data [ CONF_USERNAME ] or "User"
83+ default = entry .data . get ( CONF_USERNAME ) or "User"
8484 ): vol .In (["User" , "Installer" ]),
8585 vol .Required (
8686 CONF_PASSWORD ,
87- default = entry .data [ CONF_PASSWORD ] or ""
87+ default = entry .data . get ( CONF_PASSWORD ) or ""
8888 ): str ,
8989 vol .Required (
9090 CONF_SCAN_INTERVAL ,
91- default = entry .data [ CONF_SCAN_INTERVAL ] or DEFAULT_SCAN_INTERVAL
91+ default = entry .data . get ( CONF_SCAN_INTERVAL ) or DEFAULT_SCAN_INTERVAL
9292 ): cv .positive_int ,
9393 vol .Optional (
9494 ATTR_SONNEN_DEBUG ,
95- default = entry .data [ ATTR_SONNEN_DEBUG ] or DEFAULT_SONNEN_DEBUG )
95+ default = entry .data . get ( ATTR_SONNEN_DEBUG ) or DEFAULT_SONNEN_DEBUG )
9696 : cv .boolean ,
9797 }
9898 )
9999
100100 if user_input is not None :
101- await self .async_set_unique_id (entry .data [CONF_SERIAL_NUMBER ])
102- self ._abort_if_unique_id_configured ()
101+ if entry .data .get (CONF_SERIAL_NUMBER ):
102+ await self .async_set_unique_id (entry .data [CONF_SERIAL_NUMBER ])
103+ self ._abort_if_unique_id_configured ()
103104 # noinspection PyBroadException
104105 try :
105106 my_serial = await self .hass .async_add_executor_job (
Original file line number Diff line number Diff line change 66 "dependencies" : [],
77 "documentation" : " https://github.com/weltmeyer/ha_sonnenbatterie" ,
88 "iot_class" : " local_polling" ,
9+ "issue_tracker" : " https://github.com/weltmeyer/ha_sonnenbatterie/issues" ,
910 "requirements" : [" requests" ," sonnenbatterie>=0.3.0" ],
10- "version" : " 2024.12.01 "
11+ "version" : " 2024.12.02 "
1112}
You can’t perform that action at this time.
0 commit comments