mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
determine list of valid gpios in backend code
This commit is contained in:
@@ -54,7 +54,7 @@ const MS_PER_SECOND = 1000;
|
||||
const MS_PER_MINUTE = 60 * MS_PER_SECOND;
|
||||
const MS_PER_HOUR = 60 * MS_PER_MINUTE;
|
||||
const MS_PER_DAY = 24 * MS_PER_HOUR;
|
||||
const DEFAULT_GPIO = 21; // Safe GPIO for all platforms
|
||||
const DEFAULT_GPIO = -1; // not set
|
||||
const MIN_TEMP_ID = -100;
|
||||
const MAX_TEMP_ID = 100;
|
||||
const GPIO_25 = 25;
|
||||
@@ -134,6 +134,7 @@ const Sensors = () => {
|
||||
ts: [],
|
||||
as: [],
|
||||
analog_enabled: false,
|
||||
valid_gpio_list: [],
|
||||
platform: 'ESP32'
|
||||
}
|
||||
});
|
||||
@@ -573,10 +574,10 @@ const Sensors = () => {
|
||||
onSave={onAnalogDialogSave}
|
||||
creating={creating}
|
||||
selectedItem={selectedAnalogSensor}
|
||||
analogGPIOList={sensorData.valid_gpio_list}
|
||||
validator={analogSensorItemValidation(
|
||||
sensorData.as,
|
||||
selectedAnalogSensor,
|
||||
creating,
|
||||
sensorData.platform
|
||||
)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user