@property
def available_the_function_which_determine_if_the_sensor_is_available_based_on_api_results(self) -> bool:
if self.coordinator.was_last_update_success_if_this_value_is_true_that_mean_we_would_check_wether_result_included_our_sensor_type_else_return_false and self._air_data:
sensor_type_todo_have_to_change_this_value_to_property_method_to_do_callback_after_value_changed = self.entity_description.key_to_access_api
if sensor_type_todo_have_to_change_this_value_to_property_method_to_do_callback_after_value_changed in self._air_data.sensors:
return True
if sensor_type_todo_have_to_change_this_value_to_property_method_to_do_callback_after_value_changed in DUST_ALIASES and API_DUST in self._air_data.sensors:
return True
if sensor_type_todo_have_to_change_this_value_to_property_method_to_do_callback_after_value_changed == API_SCORE:
return True
return False
으악
해당 댓글은 삭제되었습니다.
???
ㄹㅇ 잘읽히고 직관적인데?
ㄹㅇ 변수명 걍 좀 길게쓰지 어차피 IDE으로 자동완성할거면서
짧으니까 망정이지 이런 식으로 몇천줄 썼다고 생각해봐
함수로 나뉘어서 ㄱㅊ
주석을 코드로... - dc App