It is incorrect to return None as a result of proprety call because in such a case state_attr call will return None as well, which means "Unknown attribute". Instead for preset_mode(s) PRESET_NONE constant should be used for consistency.
It is incorrect to return None as a result of proprety call because in such a case state_attr call will return None as well, which means "Unknown attribute". Instead for preset_mode(s) PRESET_NONE constant should be used for consistency.