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:
lrmate authored and Paulus Schoutsen committed 2017-06-30 23:56:46 -07:00
1 parent d3bc8519c0
commit d267fc608f
1 file changed
+4
@@ -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."""