Add service to stop/restart modbus (#55599)

* Add service to stop/restart modbus.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
jan iversen 2021-09-14 09:42:50 +02:00 committed by GitHub
parent 31623368c8
commit aaa62dadec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 180 additions and 28 deletions

View file

@ -74,6 +74,7 @@ class ModbusCover(BasePlatform, CoverEntity, RestoreEntity):
self._status_register_type = config[CONF_STATUS_REGISTER_TYPE]
self._attr_supported_features = SUPPORT_OPEN | SUPPORT_CLOSE
self._attr_is_closed = False
# If we read cover status from coil, and not from optional status register,
# we interpret boolean value False as closed cover, and value True as open cover.