Set modbus entity to non-available unless scan_interval=0 (#53155)

This commit is contained in:
jan iversen 2021-07-21 07:48:02 +02:00 committed by GitHub
parent 8a72e8df79
commit 2e2b340b1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 0 deletions

View file

@ -68,6 +68,7 @@ class BasePlatform(Entity):
self._value = None
self._available = True
self._scan_interval = int(entry[CONF_SCAN_INTERVAL])
self._available = self._scan_interval == 0
self._call_active = False
@abstractmethod