def poll(args):
    """Poll data from the sensor."""
    backend = _get_backend(args)
    poller = MiFloraPoller(args.mac, backend)
    print("Getting data from Mi Flora")
    print("FW: {}".format(poller.firmware_version()))
    print("Name: {}".format(poller.name()))
    print("Temperature: {}".format(poller.parameter_value(MI_TEMPERATURE)))
    print("Moisture: {}".format(poller.parameter_value(MI_MOISTURE)))
    print("Light: {}".format(poller.parameter_value(MI_LIGHT)))
    print("Conductivity: {}".format(poller.parameter_value(MI_CONDUCTIVITY)))
    print("Battery: {}".format(poller.parameter_value(MI_BATTERY)))
def poll ( args ) : backend = _get_backend ( args ) poller = MiFloraPoller ( args . mac , backend ) print ( "Getting data from Mi Flora" ) print ( "FW: {}" . format ( poller . firmware_version ( ) ) ) print ( "Name: {}" . format ( poller . name ( ) ) ) print ( "Temperature: {}" . format ( poller . parameter_value ( MI_TEMPERATURE ) ) ) print ( "Moisture: {}" . format ( poller . parameter_value ( MI_MOISTURE ) ) ) print ( "Light: {}" . format ( poller . parameter_value ( MI_LIGHT ) ) ) print ( "Conductivity: {}" . format ( poller . parameter_value ( MI_CONDUCTIVITY ) ) ) print ( "Battery: {}" . format ( poller . parameter_value ( MI_BATTERY ) ) )
Poll data from the sensor.