Skip to content

Commit

Permalink
🔇 Remove temporary logs
Browse files Browse the repository at this point in the history
  • Loading branch information
anarion80 committed Mar 16, 2024
1 parent c6f8a21 commit f4664d7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 25 deletions.
2 changes: 1 addition & 1 deletion custom_components/tech/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def async_setup_entry(
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up entry."""
_LOGGER.debug("Setting up entry for sensors")
_LOGGER.debug("Setting up entry for binary sensors")
controller: dict[str, Any] = config_entry.data[CONTROLLER]
coordinator: TechCoordinator = hass.data[DOMAIN][config_entry.entry_id]

Expand Down
2 changes: 0 additions & 2 deletions custom_components/tech/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ async def async_setup_entry(
+ config_entry.data[CONTROLLER][VER]
)
zones: dict[str, Any] = await coordinator.api.get_module_zones(udid)
_LOGGER.debug("Setting up climate entry, zones: %s", zones)
thermostats: list[TechThermostat] = [
TechThermostat(zones[zone], coordinator, udid, model) for zone in zones
]
Expand All @@ -72,7 +71,6 @@ def __init__(
model: str,
) -> None:
"""Initialize the Tech device."""
_LOGGER.debug("Init TechThermostat")
super().__init__(coordinator)
self._udid: str = udid
self._coordinator: TechCoordinator = coordinator
Expand Down
1 change: 0 additions & 1 deletion custom_components/tech/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def __init__(
controller_udid: str, the unique id of the controller
"""
_LOGGER.debug("Init TileEntity, device: %s", device)
super().__init__(coordinator)
self.controller_udid: str = controller_udid
self._coordinator: TechCoordinator = coordinator
Expand Down
21 changes: 0 additions & 21 deletions custom_components/tech/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def __init__(
config_entry: ConfigEntry,
) -> None:
"""Initialize the Tech battery sensor."""
_LOGGER.debug("Init TechBatterySensor... ")
super().__init__(coordinator)
self._config_entry: ConfigEntry = config_entry
self._coordinator: TechCoordinator = coordinator
Expand Down Expand Up @@ -135,7 +134,6 @@ def __init__(
config_entry: ConfigEntry,
) -> None:
"""Initialize the Tech temperature sensor."""
_LOGGER.debug("Init TechTemperatureSensor... ")
super().__init__(coordinator)
self._config_entry: ConfigEntry = config_entry
self._coordinator: TechCoordinator = coordinator
Expand Down Expand Up @@ -210,7 +208,6 @@ def __init__(
config_entry: ConfigEntry,
) -> None:
"""Initialize the Tech temperature sensor."""
_LOGGER.debug("Init TechOutsideTemperatureTile... ")
super().__init__(coordinator)
self._config_entry: ConfigEntry = config_entry
self._coordinator: TechCoordinator = coordinator
Expand All @@ -231,12 +228,6 @@ def __init__(
model=self._model, # Model of the device
manufacturer=self._manufacturer, # Manufacturer of the device
)
_LOGGER.debug(
"Init TechOutsideTemperatureTile...: %s, udid: %s, id: %s",
self._name,
self._config_entry.data[CONTROLLER][UDID],
self._id,
)

def update_properties(self, device: dict[str, Any]) -> None:
"""Update the properties of the TechOutsideTempTile object.
Expand Down Expand Up @@ -357,7 +348,6 @@ def __init__(
config_entry: ConfigEntry,
) -> None:
"""Initialize the sensor."""
_LOGGER.debug("Init ZoneSensor")
super().__init__(coordinator)
self._config_entry: ConfigEntry = config_entry
self._coordinator: TechCoordinator = coordinator
Expand Down Expand Up @@ -576,7 +566,6 @@ def __init__(
self, device: dict[str, Any], coordinator: TechCoordinator, controller_udid: str
) -> None:
"""Initialize the sensor."""
_LOGGER.debug("Init Tile Temp Sensor, device: %s", device)
TileSensor.__init__(self, device, coordinator, controller_udid)
self.native_unit_of_measurement = UnitOfTemperature.CELSIUS
self.device_class = SensorDeviceClass.TEMPERATURE
Expand All @@ -598,7 +587,6 @@ def __init__(
self, device: dict[str, Any], coordinator: TechCoordinator, controller_udid: str
) -> None:
"""Initialize the sensor."""
_LOGGER.debug("Init Tile Fuel Supply Sensor, device: %s", device)
TileSensor.__init__(self, device, coordinator, controller_udid)

def get_state(self, device: dict[str, Any]) -> int:
Expand All @@ -616,7 +604,6 @@ def __init__(
self, device: dict[str, Any], coordinator: TechCoordinator, controller_udid: str
) -> None:
"""Initialize the sensor."""
_LOGGER.debug("Init Tile Fan Sensor, device: %s", device)
TileSensor.__init__(self, device, coordinator, controller_udid)
self._attr_icon = assets.get_icon_by_type(device[CONF_TYPE])

Expand All @@ -632,7 +619,6 @@ def __init__(
self, device: dict[str, Any], coordinator: TechCoordinator, controller_udid: str
) -> None:
"""Initialize the sensor."""
_LOGGER.debug("Init Tile Text Sensor, device: %s", device)
TileSensor.__init__(self, device, coordinator, controller_udid)
self._name = assets.get_text(device[CONF_PARAMS]["headerId"])
self._attr_icon = assets.get_icon(device[CONF_PARAMS]["iconId"])
Expand All @@ -653,7 +639,6 @@ def __init__(
self, device: dict[str, Any], coordinator: TechCoordinator, controller_udid: str
) -> None:
"""Initialize the sensor."""
_LOGGER.debug("Init Tile Widget Sensor, device: %s", device)
TileSensor.__init__(self, device, coordinator, controller_udid)
self._name = assets.get_text(device[CONF_PARAMS]["widget2"]["txtId"])

Expand All @@ -669,7 +654,6 @@ def __init__(
self, device: dict[str, Any], coordinator: TechCoordinator, controller_udid: str
) -> None:
"""Initialize the sensor."""
_LOGGER.debug("Init Tile Valce Sensor, device: %s", device)
TileSensor.__init__(self, device, coordinator, controller_udid)
self.native_unit_of_measurement = PERCENTAGE
self.state_class = SensorStateClass.MEASUREMENT
Expand Down Expand Up @@ -725,7 +709,6 @@ def __init__(
self, device: dict[str, Any], coordinator: TechCoordinator, controller_udid: str
) -> None:
"""Initialize the sensor."""
_LOGGER.debug("Init Tile Mixing Valve Sensor, device: %s", device)
TileSensor.__init__(self, device, coordinator, controller_udid)
self.native_unit_of_measurement = PERCENTAGE
self.state_class = SensorStateClass.MEASUREMENT
Expand Down Expand Up @@ -935,15 +918,11 @@ async def async_setup_entry(

zones: dict[str, Any] = await coordinator.api.get_module_zones(controller_udid)
tiles: dict[str, Any] = await coordinator.api.get_module_tiles(controller_udid)
_LOGGER.debug("Setting up sensor entry, zones: %s", zones)
_LOGGER.debug("Setting up sensor entry, tiles: %s", tiles)

entities: list[TileSensor] = []
for t in tiles:
tile = tiles[t]
_LOGGER.debug("Setting up sensor entry, tile: %s", tile)
if tile[VISIBILITY] is False:
_LOGGER.debug("Setting up sensor entry, tile visibility is False!")
continue
if int(tile[CONF_TYPE]) == TYPE_TEMPERATURE:
entities.append(TileTemperatureSensor(tile, coordinator, controller_udid))
Expand Down

0 comments on commit f4664d7

Please sign in to comment.