Add light sensor settings

This commit is contained in:
Djuri Baars 2024-06-29 02:12:29 +02:00
parent 52e90dbdee
commit 59e2750cf3
6 changed files with 38 additions and 8 deletions

View File

@ -34,7 +34,8 @@
"flAlwaysOn": "Displaybeleuchtung immer an", "flAlwaysOn": "Displaybeleuchtung immer an",
"flEffectDelay": "Displaybeleuchtungeffekt Geschwindigkeit", "flEffectDelay": "Displaybeleuchtungeffekt Geschwindigkeit",
"flFlashOnUpd": "Displaybeleuchting bei neuem Block", "flFlashOnUpd": "Displaybeleuchting bei neuem Block",
"mempoolInstanceHelpText": "Nur wirksam, wenn die BTClock-Datenquelle deaktiviert ist. \nZur Anwendung ist ein Neustart erforderlich." "mempoolInstanceHelpText": "Nur wirksam, wenn die BTClock-Datenquelle deaktiviert ist. \nZur Anwendung ist ein Neustart erforderlich.",
"luxLightToggle": "Automatisches Umschalten des Frontlichts bei Lux"
}, },
"control": { "control": {
"systemInfo": "Systeminfo", "systemInfo": "Systeminfo",
@ -60,7 +61,8 @@
"fetchEuroNote": "If you use \"Fetch € price\" the WS Price connection will show ❌ since it uses another data source.", "fetchEuroNote": "If you use \"Fetch € price\" the WS Price connection will show ❌ since it uses another data source.",
"uptime": "Betriebszeit", "uptime": "Betriebszeit",
"wifiSignalStrength": "WiFi-Signalstärke", "wifiSignalStrength": "WiFi-Signalstärke",
"wsDataConnection": "BTClock-Datenquelle verbindung" "wsDataConnection": "BTClock-Datenquelle verbindung",
"lightSensor": "Lichtsensor"
}, },
"firmwareUpdater": { "firmwareUpdater": {
"fileUploadSuccess": "Datei erfolgreich hochgeladen, Gerät neu gestartet. WebUI in {countdown} Sekunden neu geladen", "fileUploadSuccess": "Datei erfolgreich hochgeladen, Gerät neu gestartet. WebUI in {countdown} Sekunden neu geladen",

View File

@ -34,7 +34,8 @@
"flAlwaysOn": "Frontlight always on", "flAlwaysOn": "Frontlight always on",
"flEffectDelay": "Frontlight effect speed", "flEffectDelay": "Frontlight effect speed",
"flFlashOnUpd": "Frontlight flash on new block", "flFlashOnUpd": "Frontlight flash on new block",
"mempoolInstanceHelpText": "Only effective when BTClock data-source is disabled. A restart is required to apply." "mempoolInstanceHelpText": "Only effective when BTClock data-source is disabled. A restart is required to apply.",
"luxLightToggle": "Auto toggle frontlight at lux"
}, },
"control": { "control": {
"systemInfo": "System info", "systemInfo": "System info",
@ -62,7 +63,8 @@
"fetchEuroNote": "If you use \"Fetch € price\" the WS Price connection will show ❌ since it uses another data source.", "fetchEuroNote": "If you use \"Fetch € price\" the WS Price connection will show ❌ since it uses another data source.",
"uptime": "Uptime", "uptime": "Uptime",
"wifiSignalStrength": "WiFi Signal strength", "wifiSignalStrength": "WiFi Signal strength",
"wsDataConnection": "BTClock data-source connection" "wsDataConnection": "BTClock data-source connection",
"lightSensor": "Light sensor"
}, },
"firmwareUpdater": { "firmwareUpdater": {
"fileUploadFailed": "File upload failed. Make sure you have selected the correct file and try again.", "fileUploadFailed": "File upload failed. Make sure you have selected the correct file and try again.",

View File

@ -33,7 +33,8 @@
"flAlwaysOn": "Luz de la pantalla siempre encendida", "flAlwaysOn": "Luz de la pantalla siempre encendida",
"flEffectDelay": "Velocidad del efecto de luz de la pantalla", "flEffectDelay": "Velocidad del efecto de luz de la pantalla",
"flFlashOnUpd": "Luz de la pantalla parpadea con un nuevo bloque", "flFlashOnUpd": "Luz de la pantalla parpadea con un nuevo bloque",
"mempoolInstanceHelpText": "Solo es efectivo cuando la fuente de datos BTClock está deshabilitada. \nEs necesario reiniciar para aplicar." "mempoolInstanceHelpText": "Solo es efectivo cuando la fuente de datos BTClock está deshabilitada. \nEs necesario reiniciar para aplicar.",
"luxLightToggle": "Cambio automático de luz frontal en lux"
}, },
"control": { "control": {
"turnOff": "Apagar", "turnOff": "Apagar",
@ -59,7 +60,8 @@
"fetchEuroNote": "Si utiliza \"Obtener precio en €\", la conexión de Precio WS mostrará ❌ ya que utiliza otra fuente de datos.", "fetchEuroNote": "Si utiliza \"Obtener precio en €\", la conexión de Precio WS mostrará ❌ ya que utiliza otra fuente de datos.",
"title": "Estado", "title": "Estado",
"wifiSignalStrength": "Fuerza de la señal WiFi", "wifiSignalStrength": "Fuerza de la señal WiFi",
"wsDataConnection": "Conexión de fuente de datos BTClock" "wsDataConnection": "Conexión de fuente de datos BTClock",
"lightSensor": "Sensor de luz"
}, },
"firmwareUpdater": { "firmwareUpdater": {
"fileUploadSuccess": "Archivo cargado exitosamente, reiniciando el dispositivo. Recargando WebUI en {countdown} segundos", "fileUploadSuccess": "Archivo cargado exitosamente, reiniciando el dispositivo. Recargando WebUI en {countdown} segundos",

View File

@ -34,7 +34,8 @@
"flAlwaysOn": "Displaylicht altijd aan", "flAlwaysOn": "Displaylicht altijd aan",
"flEffectDelay": "Displaylicht effect snelheid", "flEffectDelay": "Displaylicht effect snelheid",
"flFlashOnUpd": "Knipper displaylicht bij nieuw blok", "flFlashOnUpd": "Knipper displaylicht bij nieuw blok",
"mempoolInstanceHelpText": "Alleen effectief als de BTClock-gegevensbron is uitgeschakeld. \nOm toe te passen is een herstart nodig." "mempoolInstanceHelpText": "Alleen effectief als de BTClock-gegevensbron is uitgeschakeld. \nOm toe te passen is een herstart nodig.",
"luxLightToggle": "Schakelen displaylicht op lux"
}, },
"control": { "control": {
"systemInfo": "Systeeminformatie", "systemInfo": "Systeeminformatie",
@ -59,7 +60,8 @@
"fetchEuroNote": "Wanneer je \"Toon € prijs\" aanzet, zal de prijsverbinding als ❌ verbroken getoond worden vanwege het gebruik van een andere bron.", "fetchEuroNote": "Wanneer je \"Toon € prijs\" aanzet, zal de prijsverbinding als ❌ verbroken getoond worden vanwege het gebruik van een andere bron.",
"uptime": "Uptime", "uptime": "Uptime",
"wifiSignalStrength": "WiFi signaalsterkte", "wifiSignalStrength": "WiFi signaalsterkte",
"wsDataConnection": "BTClock-gegevensbron verbinding" "wsDataConnection": "BTClock-gegevensbron verbinding",
"lightSensor": "Licht sensor"
}, },
"firmwareUpdater": { "firmwareUpdater": {
"fileUploadSuccess": "Bestand geüpload, apparaat herstart. WebUI opnieuw geladen over {countdown} seconden", "fileUploadSuccess": "Bestand geüpload, apparaat herstart. WebUI opnieuw geladen over {countdown} seconden",

View File

@ -255,6 +255,24 @@
</Col> </Col>
</Row> </Row>
{/if} {/if}
{#if $settings.hasLightLevel}
<Row>
<Label md={6} for="luxLightToggle" size={$uiSettings.inputSize}
>{$_('section.settings.luxLightToggle')} ({$settings.luxLightToggle})</Label
>
<Col md="6">
<Input
type="range"
name="luxLightToggle"
id="luxLightToggle"
bind:value={$settings.luxLightToggle}
min={0}
max={1000}
step={1}
/>
</Col>
</Row>
{/if}
<Row> <Row>
<Label md={6} for="mempoolInstance" size="sm" <Label md={6} for="mempoolInstance" size="sm"
>{$_('section.settings.mempoolnstance')}</Label >{$_('section.settings.mempoolnstance')}</Label

View File

@ -146,6 +146,10 @@
</div> </div>
</div> </div>
<hr /> <hr />
{#if $settings.hasLightLevel}
{$_('section.status.lightSensor')}: {Number(Math.round($status.lightLevel))} lux
<hr />
{/if}
<Progress striped id="rssiBar" color={wifiStrengthColor} value={rssiPercent} <Progress striped id="rssiBar" color={wifiStrengthColor} value={rssiPercent}
>{rssiPercent}%</Progress >{rssiPercent}%</Progress
> >