Feature/v1.0.0 release (#12)
v1.0.0 - 2025-03-13 EHS-Sentinel has been heavily modified to incorporate the control mechanism The read-in behavior of the modbus registers has been revised from chunks to single byte MessageProcessor now runs asynchronously MessageProducer added which takes over the writing communication with the WP Configuration of HASS entities has moved from hardcoded to NASA Repository NASA Repository has been fundamentally changed All FSV Values, NASA_POWER, VAR_IN_TEMP_WATER_LAW_TARGET_F, NASA_INDOOR_OPMODE are allowed for writing mode NASA_OUTDOOR_DEFROST_STEP DEFROST STEP 10 (b'0xa') added ENUM_IN_SG_READY_MODE_STATE ACTIVE (b'0x2') added New configuration point allowControl to allow control of the Samsung EHS heat pump (deactivated by default). [!CAUTION] This functionality requires that EHS-Sentinel actively communicates with the Samsung EHS, so EHS-Sentinel intervenes here in the Modbus data traffic between the components (it sends its own messages). The activation of this functionality is exclusively at your own risk. I assume no liability for any damage caused. new configuration points in logging controlMessage (default False) to print out the controlled mesagges invalidPacket (default False) prints out invalid messages (length not ok, x34 not at end...) Dashboard template has been split, ressources/dashboard_readonly_template.yaml is for readonly mode and the ressources/dashboard_controlmode_template.yaml for control mode
This commit is contained in:
@@ -30,29 +30,10 @@ class IndentFormatter(logging.Formatter):
|
||||
|
||||
|
||||
def __init__( self, fmt=None, datefmt=None ):
|
||||
"""
|
||||
Initializes the CustomLogger instance.
|
||||
Args:
|
||||
fmt (str, optional): The format string for the log messages. Defaults to None.
|
||||
datefmt (str, optional): The format string for the date in log messages. Defaults to None.
|
||||
Attributes:
|
||||
baseline (int): The baseline stack depth when the logger is initialized.
|
||||
"""
|
||||
logging.Formatter.__init__(self, fmt, datefmt)
|
||||
self.baseline = len(inspect.stack())
|
||||
|
||||
def format( self, rec ):
|
||||
"""
|
||||
Formats the log record by adding indentation and function name.
|
||||
This method customizes the log record by adding an indentation level
|
||||
based on the current stack depth and includes the name of the function
|
||||
from which the log call was made. It then uses the base Formatter class
|
||||
to format the record and returns the formatted string.
|
||||
Args:
|
||||
rec (logging.LogRecord): The log record to be formatted.
|
||||
Returns:
|
||||
str: The formatted log record string.
|
||||
"""
|
||||
log_fmt = self.FORMATS.get(rec.levelno)
|
||||
formatter = logging.Formatter(log_fmt)
|
||||
|
||||
@@ -76,11 +57,5 @@ logger.addHandler(handler)
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
def setDebugMode():
|
||||
"""
|
||||
Set the logging level to DEBUG and log a message indicating that debug mode is enabled.
|
||||
This function sets the logging level of the logger to DEBUG, which means that all messages
|
||||
at the DEBUG level and above will be logged. It also logs a debug message to indicate that
|
||||
debug mode has been activated.
|
||||
"""
|
||||
logger.setLevel(logging.DEBUG)
|
||||
logger.debug("Debug mode is on...")
|
||||
|
||||
Reference in New Issue
Block a user