$def with (sensor, errorCode) $var title: $_('Modify Sensor') $var page: user $code: def two_digits(n): return '%02d' % int(n) def version(s): res = [int(x) for x in str(s)] return u"{}.{}{}".format(res[0], res[1], res[2])
${_('Add a New Sensor') if sensor.index < 0 else _('Edit Sensor') + (' #') + str(sensor.index+1)}
$_('Enable Sensor'):
$_('Sensor Name'):

$_('Notice: If the sensor is activated and has some entries, we recommend deleting the sensor and recreating it. For example, do not change the temperature to humidity.')

$_('Sensor Type'):
$_('Multi Sensor'):
$_('Communication Type'):
$_('Notes'):
$if int(sensor.fw) > 0:
$_('Firmware Version'): ${version(sensor.fw)}
$_(u'Sensors Firmware')