Giter Site home page Giter Site logo

jslogic-homey's Introduction

JavaScript Style Guide

JavaScript Logic

Give Homey the possibility to use JavaScript logic through flow cards

Actions

  • Get formatted date - Adds the formatted date to the global tag 'Formatted date' (DEPRECATED)
  • Get formatted date and time - Adds the formatted date and time to the global tag 'Formatted date and time'

Conditions:

  • Check if specified value is equal to one of the values in an array
  • Check if specified value contains one of the values in an array
  • Check if specified value is empty
  • Check if specified value length is less than specified number
  • Check if specified date is before date
  • Check if specified time is before time
  • Check if specified date/time is before date/time
  • Random (true|false)
  • Date number is (between|not between)
  • Month is (between|not between)
  • Date number and Month is (between|not between)
  • Check if weekday is equal to one of the given weekdays
  • Number(value1) is (between|not between) value2 and value3

Triggers

  • Date and month becomes - Triggers when the current date changes to the chosen date and month (00:00)

Case sensitivity

In the following conditions you can choose to use case sensitivity or not:

  • Value contains one of...

  • Is value exactly one of...

    Case sensitive

    Value and array will be treated as is

    Not case sensitive

    Value and array will both be lowercased

Changelog

  • 1.5.4
    • Dependency updates
  • 1.5.3
    • Dependency updates
    • Bugfix: Sunday was read wrong and has never worked in the condidition card Is "weekday" one of...
  • 1.5.2
    • Dependency updates
  • 1.5.1
    • Dependency updates
  • 1.5.0
    • Deprecated flow card Get formatted date
    • Created a new better allround flow card for formatting date and time: Get formatted date and time
    • Dependency updates
  • 1.4.5
    • Minimized footprint
  • 1.4.4
    • Dependency updates
  • 1.4.3
    • Dependency updates
  • 1.4.2
    • Dependency updates
  • 1.4.1
    • Fixed some typos
  • 1.4.0
    • New condition Number (is|is not) between
    • Removed sentry cause it weren't used
  • 1.3.3
    • Dependency updates
  • 1.3.2
    • Dependency updates
  • 1.3.1
    • Dependency updates
  • 1.3.0
    • Chore: No need to return value in Promise.resolve
    • Chore: Possible to not always pass timezone or date
    • New trigger: Date and month becomes
      • Added tests
  • 1.2.3
    • Dependency updates
  • 1.2.2
    • Dependency updates
  • 1.2.1
    • Better naming for condition 'Is value exactly (one of|not one of)...'
  • 1.2.0
    • New condition: 'Is "weekday" (one of|not one of)...'
  • 1.1.1
    • Pulled flow logic out into they're own files
    • Bugfixes
    • Added tests all around so new versions is stable with (hopefully) no bugs
  • 1.1.0
    • Dependency updates
    • New condition: 'Day and month is (between|not between)'
    • Using timezone to prevent any possible bugs since SDK3 runs on UTC..
    • Bugfix: Convert month numbers to Number to prevent any logic check bugs
  • 1.0.0
    • Dependency updates
    • Updated to SDKv3. App now requires Homey firmware >= 5.0.0. Those with Homey firmware < 5.0.0 will still have v0.2.0 (unless user uninstalls 0.2.0, then 1.0.0 is they're only option)
  • 0.2.0
  • 0.1.2
    • Enhancement: Sentry property update
  • 0.1.1
    • Added sentry
  • 0.1.0
    • Added condition 'Random (true|false)'
    • Added global tag 'Formatted date' to hold the date formatted from action 'Get formatted date'
    • Added action 'Get formatted date' where yoy can choose day by number and what format to get in. This will set the result in the global tag 'Formatted date'
  • 0.0.5
    • Cleanup
    • Bugfix: Norwegian title on trigger 'Is value length less than' fixed to correct wording
  • 0.0.4
  • 0.0.3
    • Added condition 'Is Date before Date' to check if a Date occurs before another Date
    • Added condition 'Is Time before Time' to check if one Time occurs before another Time
    • Added condition 'Is DateTime before DateTime' to check if a DateTime occurs before another DateTime
  • 0.0.2
    • Added 'Is value length less than' condition
  • 0.0.1
    • Initial version

Local development

  1. git clone [email protected]:runely/jslogic-homey.git
  2. npm i
  3. npm run homey-run or npm run homey-install

Thanks

jslogic-homey's People

Contributors

dependabot[bot] avatar liams239 avatar renovate-bot avatar renovate[bot] avatar runely avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jslogic-homey's Issues

Dutch Translation

Hi there,
I want to let you know that I will translate the app, if it's okay for you ;-)

I will make a Pull request when done.

Kind regards,

Liam

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Formatted date returns [null] in new flows

I have old flows that send push messages and timeline messages and it still works. When I create new flows the return is [null]. Formatted value result is still correct in variable list but is not returned to push and timeline from new flows. The problem appeared before the new version 1.4.0.

Check is day one of…

Add a condition to check if todays weekday is one of "multi select days"

Example:
Is Monday one of Monday, Wednesday, Friday

date/time calculation

Hey Rune,
you're on a roll :) another potential awesome app.
Will this app get the possibility to calculate with date and time?

example:
if $A is earlier then $B > set boolean
$B - $A = $C

etc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.