DerMitch/fritzbox-smarthome

get_present always returns True

Closed this issue · 1 comments

I found that get_present() always returned True
An additional cast too int() in the current implementation fixed my issue:

def get_present(self):
    """
    Check if the registered actor is currently present (reachable).
    """      
    return bool(
        int (
            self.box.homeautoswitch("getswitchpresent", self.actor_id)
        )
    )

This method is also used in get_state.

Thank you for the report.

Version 1.0.3 has been pushed to PyPi.