diff --git a/custom_components/saj_modbus/config_flow.py b/custom_components/saj_modbus/config_flow.py index a8dac04..3c83a56 100644 --- a/custom_components/saj_modbus/config_flow.py +++ b/custom_components/saj_modbus/config_flow.py @@ -1,3 +1,5 @@ +"""Config flow for SAJ R5 Inverter Modbus.""" + import ipaddress import re diff --git a/custom_components/saj_modbus/hub.py b/custom_components/saj_modbus/hub.py index 513c16f..af2942f 100644 --- a/custom_components/saj_modbus/hub.py +++ b/custom_components/saj_modbus/hub.py @@ -1,4 +1,4 @@ -"""SAJ Modbus Hub""" +"""SAJ Modbus Hub.""" from homeassistant.helpers.update_coordinator import DataUpdateCoordinator from voluptuous.validators import Number import logging diff --git a/custom_components/saj_modbus/sensor.py b/custom_components/saj_modbus/sensor.py index 8622230..1a559cb 100644 --- a/custom_components/saj_modbus/sensor.py +++ b/custom_components/saj_modbus/sensor.py @@ -1,3 +1,5 @@ +"""Sensor Platform Device for SAJ R5 Inverter Modbus.""" + from __future__ import annotations from datetime import datetime from homeassistant.helpers.update_coordinator import CoordinatorEntity @@ -98,4 +100,6 @@ def native_value(self): # the values returned by the inverter are not reliable. if self.coordinator.data.get("mpvmode") in (1, 2): # "Waiting" or "Normal" return self.coordinator.data.get(self.entity_description.key) - return None \ No newline at end of file + return None + + diff --git a/custom_components/saj_modbus/services.py b/custom_components/saj_modbus/services.py index 09bd748..1f16e39 100644 --- a/custom_components/saj_modbus/services.py +++ b/custom_components/saj_modbus/services.py @@ -69,4 +69,5 @@ async def async_set_date_time(hass: HomeAssistant, data: Mapping[str, Any]) -> N await hass.async_add_executor_job( hub.set_date_and_time, data.get(ATTR_DATETIME, None) - ) \ No newline at end of file + ) +