mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Update modbus.py (#8256)
* Update modbus.py Prevents Modbus binary sensors showing up as "unnamed_device". Originally proposed here https://community.home-assistant.io/t/modbus-sensor/6751/11 by user Pjeter * Update modbus.py
This commit is contained in:
parent
7123ec14be
commit
e077998d38
@ -50,6 +50,10 @@ class ModbusCoilSensor(BinarySensorDevice):
|
||||
self._coil = int(coil)
|
||||
self._value = None
|
||||
|
||||
def name(self):
|
||||
"""Return the name of the sensor."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Return the state of the sensor."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user