Bonjour à toutes et tous,
Beaucoup de grattent la tête afin de réaliser dans un scénario un test de plage horaire, quoi de plus logique dans une domotique après tout
Voici un tuto très court mais qui j'espère éclairera la chandelle des débutants
Pour tester une plage horaire, la première chose à faire et de déterminer si la plage horaire couvre minuit ou pas!
De là va dépendre le test à mettre en place dans votre scénario.
Prenons donc directement un exemple:
Je veux tester si on est entre 8h00 du matin et 23h00 : SI (#time# > 0800 ET #time# < 2300)
Je veux tester si on est entre 23h00 et 5h00 du matin : SI (#time# > 2300 OU #time# < 0500)
Voilà l'importance de la notion de couvrir 'minuit' on fait un OU et non plus un ET
NB : A partir de la version 3.2 du core, une fonction a été ajoutée.
time_between(#time#,2100,0800) ou time_between(#time#,1200,2300)
Qui permet donc de savoir si #time# est dans la tranche passée en paramètres.
[Tuto] Tester une plage horaire...
Aller
- Informations
- ↳ Annonces officielles
- ↳ Présentation et Vitrine d'installations
- ↳ Discussions Générales
- ↳ Petites annonces
- ↳ Tutoriels
- Logiciel Jeedom [Core]
- ↳ Utilisation
- ↳ Backup/Restauration
- ↳ Interactions
- ↳ Scénarios
- ↳ Interfaces
- ↳ Portail web classique (Desktop)
- ↳ Portail web smartphone & tablettes
- ↳ [Plugin officiel] App mobile
- ↳ [Plugin tiers] Application mobile
- ↳ Market Jeedom
- ↳ Suggestions pour le Core
- Plugins Jeedom
- ↳ [Catégorie] Automatisation
- ↳ [Catégorie] Communication
- ↳ [Plugin Officiel] Assistant vocaux
- ↳ [Plugin Officiel] IFTTT
- ↳ [Plugin Officiel] Jeelink
- ↳ [Plugin Officiel] Mail
- ↳ [Plugin Officiel] Networks
- ↳ [Plugin Officiel] SMS
- ↳ [Plugin Tiers] Homebridge
- ↳ [Catégorie] Confort / Bien-être
- ↳ [Plugin Officiel] Green Momit
- ↳ [Plugin Officiel] Nest
- ↳ [Plugin officiel] Thermostat
- ↳ [Catégorie] Energie
- ↳ [Plugin officiel] Energie
- ↳ [Catégorie] Météo
- ↳ [Plugin Officiel] Météo
- ↳ [Plugin Officiel] Netatmo
- ↳ [Catégorie] Multimédia
- ↳ [Plugin Officiel] Denon AVR
- ↳ [Plugin Officiel] Kodi
- ↳ [Plugin Officiel] Sonos controller
- ↳ [Plugin Officiel] SqueezeBox Control
- ↳ [Catégorie] Nature
- ↳ [Catégorie] Monitoring
- ↳ [Plugin Tiers] Monitoring
- ↳ [Plugin Officiel] Onduleur (NUT)
- ↳ [Catégorie] Objets connectés
- ↳ [Plugin Officiel] Broadlink
- ↳ [Plugin Officiel] Karotz
- ↳ [Plugin Officiel] Philips Hue
- ↳ [Catégorie] Organisation
- ↳ [Plugin officiel] Agenda
- ↳ [Plugin Officiel] Géolococalisation
- ↳ [Plugin Officiel] Mode
- ↳ [Plugin Officiel] Waze in Time
- ↳ [Catégorie] Passerelle Domotique
- ↳ [Plugin Tiers] Imperihome
- ↳ [Plugin Tiers] Zibasedom
- ↳ [Catégorie] Programmation
- ↳ [Plugin Officiel] Click Link
- ↳ [Plugin officiel] Scripts
- ↳ [Plugin officiel] Virtuels
- ↳ [Plugin officiel] Widgets
- ↳ [Catégorie] Protocoles domotiques
- ↳ [Plugin Officiel] BLEA
- ↳ [Plugin Officiel] Edisio
- ↳ [Plugin Officiel] EnOcean
- ↳ [Plugin Officiel] IPX 800 v4
- ↳ [Plugin Tiers] KNX
- ↳ [Plugin Tiers] MQTT
- ↳ [Plugin Tiers] MySensors
- ↳ [Plugin Officiel] RFPlayer
- ↳ [Plugin Officiel] RFXcom
- ↳ [Plugin Officiel] Wifipower
- ↳ [Plugin Tiers] Xiaomi Home
- ↳ [Plugin Officiel] xPL
- ↳ [Plugin Officiel] Z-Wave
- ↳ Plugin Z-Wave
- ↳ Configurations OpenZwave Manquantes
- ↳ [Plugin Tiers] ESPEasy
- ↳ [Catégorie] Santé
- ↳ [Catégorie] Sécurité
- ↳ [Plugin officiel] Alarme
- ↳ [Plugin officiel] Caméra
- ↳ [Plugin Officiel] Netatmo Welcome
- ↳ Développements sur Jeedom
- ↳ Suggestions de Plugins
- Matériel Jeedom - Hardware
- ↳ La box JEEDOM SMART
- ↳ La box JEEDOM MINI+
- ↳ La box JEEDOM PRO
- ↳ Do-It-Yourself ("Faire-soi-même")
- ↳ Docker
- ↳ Machines Virtuelles
- ↳ Raspberry Pi
- ↳ Synology
- International JEEDOM
- ↳ [English] JEEDOM Project
- ↳ News
- ↳ Software & Plugins
- ↳ Box's and devices
- ↳ [Deutsch] JEEDOM Projekt
- ↳ Neuigkeiten
- ↳ Software & Plugins
- ↳ Jeedom Box und Geräte
- ↳ [Español] Proyecto JEEDOM
- ↳ Noticias
- ↳ Software & Plugins
- ↳ Los controladores Jeedom y los dispositivos
- ↳ Translation - Traduction
- Archives
- ↳ Ancien Wiki
- ↳ Installation de Jeedom
- ↳ Core de Jeedom
- ↳ Plugins
- ↳ Widgets
- ↳ Scénarios
- ↳ Résolution de problèmes
- ↳ Utilisation & Astuces
- ↳ Modules RFXcom
- ↳ Noeuds MySensors
- ↳ Application externe tierce & Jeedom
Qui est en ligne ?
Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 12 invités