kaklakariada / fritzbox-java-api

Java API for managing FritzBox HomeAutomation
GNU General Public License v3.0
20 stars 13 forks source link

method Device().getSwichState() gives NPE #32

Open JunkerMartin opened 2 years ago

JunkerMartin commented 2 years ago

The tag-sequence "\<switch>\<state>\</state>...\</switch>" is mapped with the class SwitchState. The object may be null sometimes. The method Device().getSwitchState() currently requires it to be instantiated. Null is checked with SwitchState().isNull().

TDesjardins commented 1 year ago

@JunkerMartin Seems that this is also already fixed: https://github.com/kaklakariada/fritzbox-java-api/blob/141f563b492a1265c3d25dde006cbdeba978b091/src/main/java/com/github/kaklakariada/fritzbox/model/homeautomation/Device.java#L57