diff --git a/custom_components/blueiris/__init__.py b/custom_components/blueiris/__init__.py index fe92f49..3d5ffaa 100644 --- a/custom_components/blueiris/__init__.py +++ b/custom_components/blueiris/__init__.py @@ -58,7 +58,7 @@ async def async_options_updated(hass: HomeAssistant, entry: ConfigEntry): """Triggered by config entry options updates.""" await handle_log_level(hass, entry) - _LOGGER.info(f"async_options_updated, Entry: {entry.as_dict()} ") + _LOGGER.debug(f"async_options_updated, Entry: {entry.as_dict()} ") ha = get_ha(hass, entry.entry_id) diff --git a/custom_components/blueiris/api/blue_iris_api.py b/custom_components/blueiris/api/blue_iris_api.py index 0267fe5..e44ff56 100644 --- a/custom_components/blueiris/api/blue_iris_api.py +++ b/custom_components/blueiris/api/blue_iris_api.py @@ -105,7 +105,7 @@ async def async_post(self, data): return result async def initialize(self): - _LOGGER.info("Initializing BlueIris") + _LOGGER.debug("Initializing BlueIris") try: config_data = self.config_data @@ -147,7 +147,7 @@ async def async_update(self): await self.load_status() async def load_session_id(self): - _LOGGER.info("Retrieving session ID") + _LOGGER.debug("Retrieving session ID") request_data = {"cmd": "login"} @@ -161,7 +161,7 @@ async def load_session_id(self): self.is_logged_in = False async def login(self): - _LOGGER.info("Performing login") + _LOGGER.debug("Performing login") logged_in = False @@ -239,7 +239,7 @@ async def load_status(self): self.status[key] = data[key] async def set_profile(self, profile_id): - _LOGGER.info(f"Setting profile {profile_id}") + _LOGGER.debug(f"Setting profile {profile_id}") await self._set_profile(profile_id) @@ -266,7 +266,7 @@ async def _set_profile(self, profile_id, check_lock=True): self.status[key] = data[key] async def set_schedule(self, schedule_name): - _LOGGER.info(f"Setting schedule {schedule_name}") + _LOGGER.debug(f"Setting schedule {schedule_name}") await self._set_schedule(schedule_name) @@ -293,7 +293,7 @@ async def _set_schedule(self, schedule_name, check_lock=True): self.status[key] = data[key] async def trigger_camera(self, camera_short_name): - _LOGGER.info(f"Triggering camera {camera_short_name}") + _LOGGER.debug(f"Triggering camera {camera_short_name}") request_data = { "cmd": "trigger", @@ -303,7 +303,7 @@ async def trigger_camera(self, camera_short_name): await self.async_verified_post(request_data) async def move_to_preset(self, camera_short_name, preset): - _LOGGER.info(f"Moving {camera_short_name} to preset {preset}") + _LOGGER.debug(f"Moving {camera_short_name} to preset {preset}") preset_value = 100 + preset request_data = { "cmd": "ptz", diff --git a/custom_components/blueiris/binary_sensor.py b/custom_components/blueiris/binary_sensor.py index b2d2426..0019c21 100644 --- a/custom_components/blueiris/binary_sensor.py +++ b/custom_components/blueiris/binary_sensor.py @@ -24,6 +24,6 @@ async def async_setup_entry(hass, config_entry, async_add_devices): async def async_unload_entry(_hass, config_entry): - _LOGGER.info(f"async_unload_entry {CURRENT_DOMAIN}: {config_entry}") + _LOGGER.debug(f"async_unload_entry {CURRENT_DOMAIN}: {config_entry}") return True diff --git a/custom_components/blueiris/binary_sensors/audio.py b/custom_components/blueiris/binary_sensors/audio.py index 768c922..b0b4f38 100644 --- a/custom_components/blueiris/binary_sensors/audio.py +++ b/custom_components/blueiris/binary_sensors/audio.py @@ -20,7 +20,7 @@ def __init__(self): async def async_added_to_hass_local(self): """Subscribe MQTT events.""" - _LOGGER.info(f"Added new {self.name}") + _LOGGER.debug(f"Added new {self.name}") def _immediate_update(self, previous_state: bool): if previous_state != self.entity.state: @@ -32,7 +32,7 @@ def _immediate_update(self, previous_state: bool): current_timestamp = datetime.now().timestamp() async def turn_off_automatically(now): - _LOGGER.info(f"Audio alert off | {self.name} @{now}") + _LOGGER.debug(f"Audio alert off | {self.name} @{now}") self.entity_manager.set_mqtt_state(self.topic, self.event_type, False) @@ -58,7 +58,7 @@ async def turn_off_automatically(now): should_alert = False if should_alert: - _LOGGER.info(f"Audio alert on, {message} | {self.name}") + _LOGGER.debug(f"Audio alert on, {message} | {self.name}") self._last_alert = current_timestamp super()._immediate_update(previous_state) diff --git a/custom_components/blueiris/binary_sensors/base.py b/custom_components/blueiris/binary_sensors/base.py index d556dc0..c9a81f5 100644 --- a/custom_components/blueiris/binary_sensors/base.py +++ b/custom_components/blueiris/binary_sensors/base.py @@ -58,4 +58,4 @@ def _immediate_update(self, previous_state: bool): async def async_added_to_hass_local(self): """Subscribe MQTT events.""" - _LOGGER.info(f"Added new {self.name}") + _LOGGER.debug(f"Added new {self.name}") diff --git a/custom_components/blueiris/binary_sensors/main.py b/custom_components/blueiris/binary_sensors/main.py index 44e33b2..16dd8e0 100644 --- a/custom_components/blueiris/binary_sensors/main.py +++ b/custom_components/blueiris/binary_sensors/main.py @@ -42,7 +42,7 @@ def force_update(self): async def async_added_to_hass_local(self): """Subscribe MQTT events.""" - _LOGGER.info(f"Added new {self.name}") + _LOGGER.debug(f"Added new {self.name}") _LOGGER.debug( f"Subscribing to MQTT topics '{MQTT_ALL_TOPIC}', QOS: {DEFAULT_QOS}" ) diff --git a/custom_components/blueiris/camera.py b/custom_components/blueiris/camera.py index 37c23c5..9bc8765 100644 --- a/custom_components/blueiris/camera.py +++ b/custom_components/blueiris/camera.py @@ -66,7 +66,7 @@ async def async_setup_entry(hass, config_entry, async_add_devices): async def async_unload_entry(_hass, config_entry): - _LOGGER.info(f"async_unload_entry {CURRENT_DOMAIN}: {config_entry}") + _LOGGER.debug(f"async_unload_entry {CURRENT_DOMAIN}: {config_entry}") return True @@ -126,7 +126,7 @@ def _immediate_update(self, previous_state: bool): async def async_added_to_hass_local(self): """Subscribe MQTT events.""" - _LOGGER.info(f"Added new {self.name}") + _LOGGER.debug(f"Added new {self.name}") @property def supported_features(self) -> CameraEntityFeature: diff --git a/custom_components/blueiris/config_flow.py b/custom_components/blueiris/config_flow.py index 5abf61a..19b5e45 100644 --- a/custom_components/blueiris/config_flow.py +++ b/custom_components/blueiris/config_flow.py @@ -93,7 +93,7 @@ async def async_step_init(self, user_input=None): return await self.async_step_blue_iris_additional_settings(user_input) async def async_step_blue_iris_additional_settings(self, user_input=None): - _LOGGER.info(f"Starting additional settings step: {user_input}") + _LOGGER.debug(f"Starting additional settings step: {user_input}") errors = None await self._config_flow.initialize(self.hass, self._config_entry) diff --git a/custom_components/blueiris/managers/config_flow_manager.py b/custom_components/blueiris/managers/config_flow_manager.py index e9a3634..cbffd00 100644 --- a/custom_components/blueiris/managers/config_flow_manager.py +++ b/custom_components/blueiris/managers/config_flow_manager.py @@ -249,7 +249,7 @@ async def _update_entry(self): await self._config_manager.update(entry) except InvalidToken: - _LOGGER.info("Reset password") + _LOGGER.debug("Reset password") del self._data[CONF_PASSWORD] diff --git a/custom_components/blueiris/managers/device_manager.py b/custom_components/blueiris/managers/device_manager.py index d7440fd..5ef531c 100644 --- a/custom_components/blueiris/managers/device_manager.py +++ b/custom_components/blueiris/managers/device_manager.py @@ -27,7 +27,7 @@ async def async_remove_entry(self, entry_id): dr.async_clear_config_entry(entry_id) async def delete_device(self, name): - _LOGGER.info(f"Deleting device {name}") + _LOGGER.debug(f"Deleting device {name}") device = self._devices[name] diff --git a/custom_components/blueiris/managers/entity_manager.py b/custom_components/blueiris/managers/entity_manager.py index fb523e0..d755370 100644 --- a/custom_components/blueiris/managers/entity_manager.py +++ b/custom_components/blueiris/managers/entity_manager.py @@ -243,7 +243,7 @@ async def _async_update(self): restored = state.attributes.get("restored", False) if restored: - _LOGGER.info( + _LOGGER.debug( f"Entity {entity.name} restored | {entity_id}" ) @@ -264,7 +264,7 @@ async def _async_update(self): async_add_entities(entities_to_add, True) if len(entities_to_delete) > 0: - _LOGGER.info(f"Following items will be deleted: {entities_to_delete}") + _LOGGER.debug(f"Following items will be deleted: {entities_to_delete}") for domain in SIGNALS: entities = dict(self.get_entities(domain)) diff --git a/custom_components/blueiris/managers/home_assistant.py b/custom_components/blueiris/managers/home_assistant.py index 875a260..68a10fa 100644 --- a/custom_components/blueiris/managers/home_assistant.py +++ b/custom_components/blueiris/managers/home_assistant.py @@ -138,12 +138,12 @@ async def async_update_entry(self, entry: ConfigEntry = None): ) if not self._is_initialized: - _LOGGER.info( + _LOGGER.debug( f"NOT INITIALIZED - Failed handling ConfigEntry change: {entry.as_dict()}" ) return - _LOGGER.info(f"Handling ConfigEntry change: {entry.as_dict()}") + _LOGGER.debug(f"Handling ConfigEntry change: {entry.as_dict()}") if update_config_manager: await self._config_manager.update(entry) @@ -164,7 +164,7 @@ async def async_update_entry(self, entry: ConfigEntry = None): await self.storage_manager.async_save_to_store(data) async def async_remove(self, entry: ConfigEntry): - _LOGGER.info(f"Removing current integration - {entry.title}") + _LOGGER.debug(f"Removing current integration - {entry.title}") if self._remove_async_track_time is not None: self._remove_async_track_time() @@ -177,11 +177,11 @@ async def async_remove(self, entry: ConfigEntry): await self._device_manager.async_remove() - _LOGGER.info(f"Current integration ({entry.title}) removed") + _LOGGER.debug(f"Current integration ({entry.title}) removed") async def async_update(self, event_time): if not self._is_initialized: - _LOGGER.info(f"NOT INITIALIZED - Failed updating @{event_time}") + _LOGGER.debug(f"NOT INITIALIZED - Failed updating @{event_time}") return try: @@ -231,7 +231,7 @@ async def delete_entity(self, domain, name): async def dispatch_all(self): if not self._is_initialized: - _LOGGER.info("NOT INITIALIZED - Failed discovering components") + _LOGGER.debug("NOT INITIALIZED - Failed discovering components") return for domain in SUPPORTED_DOMAINS: diff --git a/custom_components/blueiris/switch.py b/custom_components/blueiris/switch.py index 8f1985e..0f300db 100644 --- a/custom_components/blueiris/switch.py +++ b/custom_components/blueiris/switch.py @@ -27,7 +27,7 @@ async def async_setup_entry(hass, config_entry, async_add_devices): async def async_unload_entry(_hass, config_entry): - _LOGGER.info(f"async_unload_entry {CURRENT_DOMAIN}: {config_entry}") + _LOGGER.debug(f"async_unload_entry {CURRENT_DOMAIN}: {config_entry}") return True @@ -107,4 +107,4 @@ def _immediate_update(self, previous_state: bool): async def async_added_to_hass_local(self): """Subscribe MQTT events.""" - _LOGGER.info(f"Added new {self.name}") + _LOGGER.debug(f"Added new {self.name}")