Change warning to info when modbus is ready (#57953)

* Change warning to info.

* Make level info implicit.
This commit is contained in:
jan iversen 2021-10-19 04:38:33 +02:00 committed by GitHub
parent 9561c51276
commit f92fe38bbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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(

View File

@ -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)