From f92fe38bbd73469ef0b91a279e3dc823fa406d57 Mon Sep 17 00:00:00 2001 From: jan iversen Date: Tue, 19 Oct 2021 04:38:33 +0200 Subject: [PATCH] Change warning to info when modbus is ready (#57953) * Change warning to info. * Make level info implicit. --- homeassistant/components/modbus/modbus.py | 2 +- tests/components/modbus/test_init.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/modbus/modbus.py b/homeassistant/components/modbus/modbus.py index d53556b392a..ee5e8306696 100644 --- a/homeassistant/components/modbus/modbus.py +++ b/homeassistant/components/modbus/modbus.py @@ -354,7 +354,7 @@ class ModbusHub: return False else: message = f"modbus {self.name} communication open" - _LOGGER.warning(message) + _LOGGER.info(message) return True def _pymodbus_call( diff --git a/tests/components/modbus/test_init.py b/tests/components/modbus/test_init.py index 08b9540d507..a303e116307 100644 --- a/tests/components/modbus/test_init.py +++ b/tests/components/modbus/test_init.py @@ -770,6 +770,7 @@ async def test_shutdown(hass, caplog, mock_pymodbus, mock_modbus_with_pymodbus): async def test_stop_restart(hass, caplog, mock_modbus): """Run test for service stop.""" + caplog.set_level(logging.INFO) entity_id = f"{SENSOR_DOMAIN}.{TEST_ENTITY_NAME}" assert hass.states.get(entity_id).state == STATE_UNKNOWN hass.states.async_set(entity_id, 17)