Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Jan 31, 2024
1 parent 1318a0c commit d401b17
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions custom_components/echonetlite/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@

#
def is_regist_as_sensor(epc_function_data):
if type(epc_function_data) == list:
if type(epc_function_data[1]) == dict and len(epc_function_data[1]) > 1:
return True # Switch or Select
if callable(epc_function_data[0]) and epc_function_data[0] == _hh_mm:
return True # Time
else:
if callable(epc_function_data) and epc_function_data == _hh_mm:
if epc_function_data:
if type(epc_function_data) == list:
if type(epc_function_data[1]) == dict and len(epc_function_data[1]) > 1:
return True # Switch or Select
if callable(epc_function_data[0]) and epc_function_data[0] == _hh_mm:
return True # Time
elif callable(epc_function_data) and epc_function_data == _hh_mm:
return True # Time
return False

Expand Down

0 comments on commit d401b17

Please sign in to comment.