File tree Expand file tree Collapse file tree 4 files changed +21
-16
lines changed
custom_components/netgear_plus Expand file tree Collapse file tree 4 files changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ some basic configuration updates.
6868| GS108Ev4 | 8 | V1.0.1.3 | |
6969| GS108PEv3 | 8 | V2.06.24 | V2.06.01 |
7070| GS110EMX | 10 | V1.0.2.8 | |
71- | GS116Ev2 | 16 | ? | ? |
71+ | GS116Ev2 | 16 | V2.6.0.48, V2.6.0.50 | ? |
7272| GS305E | 5 | V1.0.0.16 | V1.0.0.2 |
7373| GS305EP | 5 | V1.0.1.1 | |
7474| GS305EPP | 5 | V1.0.1.4 | |
Original file line number Diff line number Diff line change @@ -28,6 +28,23 @@ async def async_setup_entry(
2828 coordinator_switch_infos = config_entry .runtime_data .coordinator_switch_infos
2929
3030 if gs_switch .api :
31+ if gs_switch .api .switch_model .has_reboot_button ():
32+ _LOGGER .info (
33+ "[button.async_setup_entry]"
34+ " setting up Platform.BUTTON for Switch Reboot"
35+ )
36+ entities .append (
37+ NetgearRebootButtonEntity (
38+ coordinator = coordinator_switch_infos ,
39+ hub = gs_switch ,
40+ entity_description = NetgearButtonEntityDescription (
41+ key = "reboot" ,
42+ name = "Reboot Switch" ,
43+ device_class = ButtonDeviceClass .RESTART ,
44+ ),
45+ )
46+ )
47+
3148 n_poe_ports = 0
3249 if gs_switch .api .poe_ports :
3350 n_poe_ports = len (gs_switch .api .poe_ports )
@@ -37,18 +54,6 @@ async def async_setup_entry(
3754 n_poe_ports ,
3855 )
3956
40- entities .append (
41- NetgearRebootButtonEntity (
42- coordinator = coordinator_switch_infos ,
43- hub = gs_switch ,
44- entity_description = NetgearButtonEntityDescription (
45- key = "reboot" ,
46- name = "Reboot Switch" ,
47- device_class = ButtonDeviceClass .RESTART ,
48- ),
49- )
50- )
51-
5257 if n_poe_ports > 0 :
5358 for poe_port in gs_switch .api .poe_ports :
5459 switch_entity = NetgearPoEPowerCycleButtonEntity (
Original file line number Diff line number Diff line change 66 "documentation" : " https://github.com/ckarrie/ha-netgear-plus/blob/main/README.md" ,
77 "iot_class" : " local_polling" ,
88 "issue_tracker" : " https://github.com/ckarrie/ha-netgear-plus/issues" ,
9- "requirements" : [" lxml>=4.6.1" , " py-netgear-plus==v0.4.6 " ],
9+ "requirements" : [" lxml>=4.6.1" , " py-netgear-plus==v0.4.7 " ],
1010 "ssdp" : [
1111 {
1212 "manufacturer" : " NETGEAR" ,
1313 "deviceType" : " urn:schemas-upnp-org:device:InternetGatewayDevice:1"
1414 }
1515 ],
16- "version" : " 0.7.8 "
16+ "version" : " 0.7.9 "
1717}
Original file line number Diff line number Diff line change 11colorlog == 6.9.0
22homeassistant >= 2024.12.5
33lxml >= 4.6.1
4- py-netgear-plus == v0.4.6
4+ py-netgear-plus == v0.4.7
55pip >= 21.3.1
66ruff == 0.11.13
You can’t perform that action at this time.
0 commit comments