Skip to content

Commit

Permalink
Merge gladys 4.49.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ngeissel committed Nov 12, 2024
2 parents 5b500fa + 7a24976 commit ef146c6
Show file tree
Hide file tree
Showing 37 changed files with 2,628 additions and 431 deletions.
4 changes: 3 additions & 1 deletion front/src/components/boxs/device-in-room/DeviceRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import ThermostatDeviceFeature from './device-features/ThermostatDeviceFeature';
import AirConditioningModeDeviceFeature from './device-features/AirConditioningModeDeviceFeature';
import PilotWireModeDeviceFeature from './device-features/PilotWireModeDeviceFeature';
import LMHVolumeDeviceFeature from './device-features/LMHVolumeDeviceFeature';
import PushDeviceFeature from './device-features/PushDeviceFeature';

const ROW_TYPE_BY_FEATURE_TYPE = {
[DEVICE_FEATURE_TYPES.LIGHT.BINARY]: BinaryDeviceFeature,
Expand All @@ -33,7 +34,8 @@ const ROW_TYPE_BY_FEATURE_TYPE = {
[DEVICE_FEATURE_TYPES.HEATER.PILOT_WIRE_MODE]: PilotWireModeDeviceFeature,
[DEVICE_FEATURE_TYPES.SIREN.LMH_VOLUME]: LMHVolumeDeviceFeature,
[DEVICE_FEATURE_TYPES.SIREN.MELODY]: NumberDeviceFeature,
[DEVICE_FEATURE_TYPES.DURATION.DECIMAL]: MultiLevelDeviceFeature
[DEVICE_FEATURE_TYPES.DURATION.DECIMAL]: MultiLevelDeviceFeature,
[DEVICE_FEATURE_TYPES.BUTTON.PUSH]: PushDeviceFeature
};

const DeviceRow = ({ children, ...props }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const SUPPORTED_FEATURE_TYPES = [
DEVICE_FEATURE_TYPES.HEATER.PILOT_WIRE_MODE,
DEVICE_FEATURE_TYPES.SIREN.LMH_VOLUME,
DEVICE_FEATURE_TYPES.SIREN.MELODY,
DEVICE_FEATURE_TYPES.DURATION.DECIMAL
DEVICE_FEATURE_TYPES.DURATION.DECIMAL,
DEVICE_FEATURE_TYPES.BUTTON.PUSH
];

export default SUPPORTED_FEATURE_TYPES;
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Component } from 'preact';
import cx from 'classnames';
import { Text } from 'preact-i18n';
import style from './style.css';

class PushDeviceComponent extends Component {
constructor(props) {
super(props);
this.state = {
loading: false
};
}
push = async () => {
await this.setState({ loading: true });
this.props.updateValue(this.props.deviceFeature, 1);
setTimeout(() => {
this.setState({ loading: false });
}, 350);
};

render(props, { loading }) {
return (
<tr>
<td>
<i class="fe fe-circle" />
</td>
<td>{props.rowName}</td>
<td class="text-right">
<button
onClick={this.push}
type="button"
class={cx('btn', 'btn-outline-success', 'btn-sm', style.btnLoading, {
'btn-loading': loading
})}
>
<i class="fe fe-circle" /> <Text id="dashboard.boxes.devicesInRoom.pushButton" />
</button>
</td>
</tr>
);
}
}

export default PushDeviceComponent;
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ input[type='range'][class~='light-temperature']::-ms-fill-lower {
display: none;
}
}

.btnLoading {
&::after {
border: 2px solid #5eba00;
}
}
94 changes: 88 additions & 6 deletions front/src/config/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@
"deviceTitle": "{{name}} - {{type}}",
"addButton": "+",
"substractButton": "-",
"motionDetected": "Bewegung erkannt"
"motionDetected": "Bewegung erkannt",
"pushButton": "Schieben"
},
"devices": {
"editDeviceFeaturesLabel": "Wähle die Geräte aus, die du anzeigen möchtest:",
Expand Down Expand Up @@ -2035,6 +2036,13 @@
"variablesExplanation": "Um eine Variable im Text einzufügen, gib \"{{\" ein. Um einen Variablenwert festzulegen, musst du vor diesem Feld das das Feld \"Gerätewert abrufen\" verwenden.",
"messagePlaceholder": "Meine Message"
},
"zigbee2mqttMessage": {
"topic": "Topic",
"topicPlaceholder": "/gladys/mein-topic",
"messageLabel": "Message",
"variablesExplanation": "Um eine Variable im Text einzufügen, gib \"{{\" ein. Um einen Variablenwert festzulegen, musst du vor diesem Feld das das Feld \"Gerätewert abrufen\" verwenden.",
"messagePlaceholder": "Meine Message"
},
"playNotification": {
"description": "Diese Aktion lässt Gladys auf dem ausgewählten Lautsprecher sprechen.",
"needGladysPlus": "Erfordert Gladys Plus, da die Text-to-Speech-APIs kostenpflichtig sind.",
Expand Down Expand Up @@ -2103,6 +2111,9 @@
"mqtt": {
"send": "MQTT-Message senden"
},
"zigbee2mqtt": {
"send": "Zigbee2mqtt-Message senden"
},
"music": {
"play-notification": "Auf einem Lautsprecher sprechen"
},
Expand Down Expand Up @@ -2134,8 +2145,8 @@
"sunset": "Jeder Sonnenuntergang"
},
"user": {
"back-home": "Benutzer hat das Zuhause verlassen",
"left-home": "Benutzer ist zurück zu Hause"
"back-home": "Benutzer ist zurück zu Hause",
"left-home": "Benutzer hat das Zuhause verlassen"
},
"house": {
"empty": "Das Zuhause ist leer",
Expand Down Expand Up @@ -2175,7 +2186,8 @@
"on": "Ein",
"off": "Aus",
"deviceSeen": "Wenn das Gerät erkannt wird",
"onlyExecuteAtThreshold": "Nur ausführen, wenn der Schwellenwert überschritten wird (und nicht bei jedem vom Gerät gesendeten Wert)"
"onlyExecuteAtThreshold": "Nur ausführen, wenn der Schwellenwert überschritten wird (und nicht bei jedem vom Gerät gesendeten Wert)",
"activateOrDeactivateForDuration": "Szene ausführen, nachdem die Bedingung für die Dauer gültig war:"
},
"scheduledTrigger": {
"typeLabel": "Typ",
Expand Down Expand Up @@ -2929,7 +2941,15 @@
"48": "Langer Druck",
"49": "Kurzes Loslassen",
"50": "Langes Loslassen",
"51": "Doppeltes Drücken"
"51": "Doppeltes Drücken",
"52": "Umschalten",
"53": "Umschalten Gehalten",
"54": "Helligkeit Auf-Taste gedrückt",
"55": "Helligkeit Auf-Taste gehalten",
"56": "Helligkeit Auf-Taste Loslassen",
"57": "Helligkeit Ab-Taste gedrückt",
"58": "Helligkeit Ab-Taste gehalten",
"59": "Helligkeit Ab-Taste Loslassen"
}
},
"heater": {
Expand Down Expand Up @@ -3095,7 +3115,8 @@
},
"button": {
"shortCategoryName": "Schaltfläche",
"click": "Schaltfläche (Klick)"
"click": "Schaltfläche (Klick)",
"push": "Druckknopf"
},
"pressure-sensor": {
"shortCategoryName": "Drucksensor",
Expand Down Expand Up @@ -3199,6 +3220,67 @@
"index": "Index",
"daily-consumption": "Tagesverbrauch"
},
"teleinformation": {
"shortCategoryName": "Teleinformation",
"binary": "Schalter",
"east": "Gesamt abgegebene Wirkleistung (EAST)",
"eait": "Gesamt eingespeiste Wirkleistung (EAIT)",
"easf01": "Gesamt abgegebene Wirkleistung vom Anbieter (EASF01)",
"easf02": "Gesamt abgegebene Wirkleistung vom Anbieter (EASF02)",
"easf03": "Gesamt abgegebene Wirkleistung vom Anbieter (EASF03)",
"easf04": "Gesamt abgegebene Wirkleistung vom Anbieter (EASF04)",
"easf05": "Gesamt abgegebene Wirkleistung vom Anbieter (EASF05)",
"easf06": "Gesamt abgegebene Wirkleistung vom Anbieter (EASF06)",
"easf07": "Gesamt abgegebene Wirkleistung vom Anbieter (EASF07)",
"easf08": "Gesamt abgegebene Wirkleistung vom Anbieter (EASF08)",
"easf09": "Gesamt abgegebene Wirkleistung vom Anbieter (EASF09)",
"easf10": "Gesamt abgegebene Wirkleistung vom Anbieter (EASF10)",
"pref": "Referenz-Scheinleistung (PREF)",
"pcoup": "Scheinleistungsschwelle (PCOUP)",
"vtic": "Protokollversion (VTIC)",
"ccasn": "Aktueller Punkt der entnommenen Lastkurve (CCASN)",
"ccasn_1": "Vorheriger Punkt der entnommenen Lastkurve (CCASN-1)",
"umoy1": "Durchschnittliche Effektivspannung (UMOY1)",
"umoy2": "Durchschnittliche Effektivspannung (UMOY2)",
"umoy3": "Durchschnittliche Effektivspannung (UMOY3)",
"erq1": "Gesamt Blindleistung Q1 (ERQ1)",
"erq2": "Gesamt Blindleistung Q2 (ERQ2)",
"erq3": "Gesamt Blindleistung Q3 (ERQ3)",
"erq4": "Gesamt Blindleistung Q4 (ERQ4)",
"irms1": "Effektivstrom (IRMS1)",
"irms2": "Effektivstrom (IRMS2)",
"irms3": "Effektivstrom (IRMS3)",
"urms1": "Effektivspannung (URMS1)",
"urms2": "Effektivspannung (URMS2)",
"urms3": "Effektivspannung (URMS3)",
"easd01": "Entnommene Wirkenergie des Verteilers (EASD01)",
"easd02": "Entnommene Wirkenergie des Verteilers (EASD02)",
"easd03": "Entnommene Wirkenergie des Verteilers (EASD03)",
"easd04": "Entnommene Wirkenergie des Verteilers (EASD04)",
"ntarf": "Tarif-Indexnummer (NTARF)",
"ccain": "Punkt n der entnommenen Lastkurve (CCAIN)",
"ccain_1": "Punkt n-1 der entnommenen Lastkurve (CCAIN-1)",
"sinsti": "Momentan eingespeiste Scheinleistung (SINSTI)",
"smaxin": "Max. eingespeiste Scheinleistung n (SMAXIN)",
"smaxin_1": "Max. eingespeiste Scheinleistung n-1 (SMAXIN-1)",
"smaxn": "Max. abgegebene Scheinleistung (SMAXN)",
"smaxn2": "Max. abgegebene Scheinleistung (SMAXN2)",
"smaxn3": "Max. abgegebene Scheinleistung (SMAXN3)",
"sinsts": "Momentane abgegebene Scheinleistung (SINSTS)",
"sinsts2": "Momentane abgegebene Scheinleistung (SINSTS2)",
"sinsts3": "Momentane abgegebene Scheinleistung (SINSTS3)",
"smaxn_1": "Max. entnommene Scheinleistung n-1 (SMAXN-1)",
"smaxn2_1": "Max. entnommene Scheinleistung n-1 (SMAXN2-1)",
"smaxn3_1": "Max. entnommene Scheinleistung n-1 (SMAXN3-1)",
"hhphc": "HPHC-Programm (HHPHC)",
"imax": "Spitzenstrom (IMAX)",
"adps": "Warnung bei Überschreitung der Vertragsleistung (ADPS)",
"imax2": "Spitzenstrom (IMAX2)",
"imax3": "Spitzenstrom (IMAX3)",
"adir1": "Überstromwarnung (ADIR1)",
"adir2": "Überstromwarnung (ADIR2)",
"adir3": "Überstromwarnung (ADIR3)"
},
"volume-sensor": {
"shortCategoryName": "Lautstärke-Sensor",
"decimal": "Lautstärke (dezimal)",
Expand Down
94 changes: 88 additions & 6 deletions front/src/config/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@
"deviceTitle": "{{name}} - {{type}}",
"addButton": "+",
"substractButton": "-",
"motionDetected": "Motion detected"
"motionDetected": "Motion detected",
"pushButton": "Push"
},
"devices": {
"editDeviceFeaturesLabel": "Select the devices you want to display:",
Expand Down Expand Up @@ -2035,6 +2036,13 @@
"variablesExplanation": "To inject a variable in the text, press '{{ '. To set a variable value, you need to use the 'Get device value' box before this one.",
"messagePlaceholder": "My message"
},
"zigbee2mqttMessage": {
"topic": "Topic",
"topicPlaceholder": "/gladys/my-topic",
"messageLabel": "Message",
"variablesExplanation": "To inject a variable in the text, press '{{ '. To set a variable value, you need to use the 'Get device value' box before this one.",
"messagePlaceholder": "My message"
},
"playNotification": {
"description": "This action will make Gladys speak on the selected speaker.",
"needGladysPlus": "Requires Gladys Plus as Text-To-Speech APIs are paid.",
Expand Down Expand Up @@ -2103,6 +2111,9 @@
"mqtt": {
"send": "Send MQTT Message"
},
"zigbee2mqtt": {
"send": "Send Zigbee2mqtt Message"
},
"music": {
"play-notification": "Talk on a speaker"
},
Expand Down Expand Up @@ -2134,8 +2145,8 @@
"sunset": "Every sunset"
},
"user": {
"back-home": "User left home",
"left-home": "User back at home"
"back-home": "User back at home",
"left-home": "User left home"
},
"house": {
"empty": "House is empty",
Expand Down Expand Up @@ -2175,7 +2186,8 @@
"on": "On",
"off": "Off",
"deviceSeen": "If the device is detected",
"onlyExecuteAtThreshold": "Execute only when threshold is passed (and not at every value sent by the device)"
"onlyExecuteAtThreshold": "Execute only when threshold is passed (and not at every value sent by the device)",
"activateOrDeactivateForDuration": "Run the scene after the condition has been valid for:"
},
"scheduledTrigger": {
"typeLabel": "Type",
Expand Down Expand Up @@ -2929,7 +2941,15 @@
"48": "Long press",
"49": "Short release",
"50": "Long release",
"51": "Double press"
"51": "Double press",
"52": "Toggle",
"53": "Toggle Hold",
"54": "Brightness Up Click",
"55": "Brightness Up Hold",
"56": "Brightness Up Release",
"57": "Brightness Down Click",
"58": "Brightness Down Hold",
"59": "Brightness Down Release"
}
},
"heater": {
Expand Down Expand Up @@ -3095,7 +3115,8 @@
},
"button": {
"shortCategoryName": "Button",
"click": "Button (click)"
"click": "Button (click)",
"push": "Push button"
},
"pressure-sensor": {
"shortCategoryName": "Pressure sensor",
Expand Down Expand Up @@ -3199,6 +3220,67 @@
"index": "Index",
"daily-consumption": "Daily Consumption"
},
"teleinformation": {
"shortCategoryName": "Teleinformation",
"binary": "Switch",
"east": "Total active power delivered (EAST)",
"eait": "Total active power injected (EAIT)",
"easf01": "Total provider active power delivered (EASF01)",
"easf02": "Total provider active power delivered (EASF02)",
"easf03": "Total provider active power delivered (EASF03)",
"easf04": "Total provider active power delivered (EASF04)",
"easf05": "Total provider active power delivered (EASF05)",
"easf06": "Total provider active power delivered (EASF06)",
"easf07": "Total provider active power delivered (EASF07)",
"easf08": "Total provider active power delivered (EASF08)",
"easf09": "Total provider active power delivered (EASF09)",
"easf10": "Total provider active power delivered (EASF10)",
"pref": "Apparent power of reference (PREF)",
"pcoup": "Apparent power threshold (PCOUP)",
"vtic": "Protocol version (VTIC)",
"ccasn": "Current point of the active load curve drawn (CCASN)",
"ccasn_1": "Previous point of the active load curve drawn (CCASN-1)",
"umoy1": "Average RMS voltage (UMOY1)",
"umoy2": "Average RMS voltage (UMOY2)",
"umoy3": "Average RMS voltage (UMOY3)",
"erq1": "Total reactive power Q1 (ERQ1)",
"erq2": "Total reactive power Q2 (ERQ2)",
"erq3": "Total reactive power Q3 (ERQ3)",
"erq4": "Total reactive power Q4 (ERQ4)",
"irms1": "RMS current (IRMS1)",
"irms2": "RMS current (IRMS2)",
"irms3": "RMS current (IRMS3)",
"urms1": "RMS voltage (URMS1)",
"urms2": "RMS voltage (URMS2)",
"urms3": "RMS voltage (URMS3)",
"easd01": "Active energy withdrawn Distributor (EASD01)",
"easd02": "Active energy withdrawn Distributor (EASD02)",
"easd03": "Active energy withdrawn Distributor (EASD03)",
"easd04": "Active energy withdrawn Distributor (EASD04)",
"ntarf": "Tarif index number (NTARF)",
"ccain": "Point n of the withdrawn active load curve (CCAIN)",
"ccain_1": "Point n-1 of the withdrawn active load curve (CCAIN-1)",
"sinsti": "Instantaneous apparent power injected (SINSTI)",
"smaxin": "Apparent power max. injected n (SMAXIN)",
"smaxin_1": "Apparent power max. injected n-1 (SMAXIN-1)",
"smaxn": "Apparent power delivered peak (SMAXN)",
"smaxn2": "Apparent power delivered peak (SMAXN2)",
"smaxn3": "Apparent power delivered peak (SMAXN3)",
"sinsts": "Immediate apparent power delivered (SINSTS)",
"sinsts2": "Immediate apparent power delivered (SINSTS2)",
"sinsts3": "Immediate apparent power delivered (SINSTS3)",
"smaxn_1": "Apparent power max. draw-off n-1 (SMAXN-1)",
"smaxn2_1": "Apparent power max. draw-off n-1 (SMAXN2-1)",
"smaxn3_1": "Apparent power max. draw-off n-1 (SMAXN3-1)",
"hhphc": "HPHC Program (HHPHC)",
"imax": "RMS current peak (IMAX)",
"adps": "Subscribed Power Exceeded Warning (ADPS)",
"imax2": "RMS current peak (IMAX2)",
"imax3": "RMS current peak (IMAX3)",
"adir1": "Overcurrent alert (ADIR1)",
"adir2": "Overcurrent alert (ADIR2)",
"adir3": "Overcurrent alert (ADIR3)"
},
"volume-sensor": {
"shortCategoryName": "Volume sensor",
"decimal": "Volume (decimal)",
Expand Down
Loading

0 comments on commit ef146c6

Please sign in to comment.