# „ODER“-Bedingung zu „zeitliche Bedingung“ hinzufügen

**URL:** <https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692>\
**Category:** Demandes livrées\
**Tags:** feature-core\
**Created:** [25. November 2021 um 17:44 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692 "2021-11-25T17:44:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [25. November 2021 um 17:44 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692/1 "2021-11-25T17:44:46Z")

</div>

**Funktionsbeschreibung**  
Ich kann eine Szene nur zwischen 18:00 und 5:00 Uhr auslösen, der Test erlaubt es nicht.  
Und leider wird das Hinzufügen einer zweiten Bedingung als „UND“ interpretiert, was immer falsch ist.

Ich schlage die Hinzufügung eines „ODER“-Buttons vor, wie in den anderen Bedingungsblöcken, speziell in den Zeitbedingungen.

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [30. Januar 2022 um 09:53 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692/2 "2022-01-30T09:53:34Z")

</div>

Ich unterstütze das voll und ganz für die zeitlichen Bedingungen, die sich über zwei Tage erstrecken (also meistens nachts).

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [31. Januar 2022 um 10:21 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692/3 "2022-01-31T10:21:42Z")

</div>

Da so viele Leute diesen Fix angefragt haben, habe ich mir Zeit genommen, um das dringend zu beheben 😅

Ich schlage diesen PR vor, ich bin offen für Feedback:

> <https://github.com/GladysAssistant/Gladys/pull/1425>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[x\] If your changes affects code, did your write the tests?
> \- \[x\] Are tests passing? (\`npm test\` on both front/server)
> \- \[x\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[x\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[x\] If you are adding a new features/services, did you run integration comparator? (\`npm run compare-translations\` on front)
> \- \[x\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to \[the community\](https://community.gladysassistant.com/) for testing before merging.
> \- \[x\] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
> \- \[x\] If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).
> \- \[x\] Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> This let the user use conditional time check when after time is before the before time.

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [31. Januar 2022 um 16:51 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692/4 "2022-01-31T16:51:59Z")

</div>

Wie bei @cicoub13 funktioniert es bei mir auch.

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [31. Januar 2022 um 17:03 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692/5 "2022-01-31T17:03:33Z")

</div>

Wenn man Druck macht, passiert so etwas …  
Das wird am Ende in Demonstrationen enden!! 🤣

Ich kann nicht sagen, ob es funktioniert, aber ich weiß nicht, wie man es testet (muss man eine Art `beta`-Instanz von Gladys haben?)

Vielen Dank auf jeden Fall für diese Schnelligkeit!!

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [31. Januar 2022 um 17:45 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692/6 "2022-01-31T17:45:58Z")

</div>

Nein, das ist wirklich manuell ab dem Quellcode.

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [31. Januar 2022 um 18:00 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692/7 "2022-01-31T18:00:39Z")

</div>

Ah ja okay, dann bin ich wohl dran ^^ danke

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [7. Februar 2022 um 09:54 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692/8 "2022-02-07T09:54:41Z")

</div>

Im Build bei Gladys v4.7.3:

[https://github.com/GladysAssistant/Gladys/actions/runs/1805667854](https://github.com/GladysAssistant/Gladys/actions/runs/1805667854)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [7. Februar 2022 um 11:15 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692/9 "2022-02-07T11:15:57Z")

</div>

Der Build ist durchgelaufen, die Version ist verfügbar 😉

Ich freue mich über Feedback zu diesem Fix, wenn alles gut ist, können wir das Thema schließen.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [8. Februar 2022 um 14:34 UTC](https://community.gladysassistant.com/t/ajouter-une-condition-ou-sur-condition-temporelle/6692/10 "2022-02-08T14:34:11Z")

</div>


