This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

Odd and even week numbers

Even though I hate week numbers, I would like this to include "Odd week numbers" and "Even week numbers", to be able to have specific flows active only during the weeks that my son stays at my place.


Comments

  • videren said:
    Even though I hate week numbers, I would like this to include "Odd week numbers" and "Even week numbers", to be able to have specific flows active only during the weeks that my son stays at my place.


    Good idea, feature requests needs to be added to the Github of Athom, that's what Athom uses for bugs/new features and you can monitor the bug/request :) 
  • viderenvideren Member
    edited October 2017
    OK, hmm, how do I add it there? :smile:
  • videren said:
    OK, hmm, how do I add it there? :smile:
    First search if there is not already a issue with the request, if it's not there you can add it with as much information possible what you want -> https://github.com/athombv/homey/issues
  • JPeJPe Member
    While you are waiting for a solution, you can probably make something yourselves,
    in '''BetterLogic' you make two variables OddWeek as Boolean  and WeekNr  as  Number:



    The first time you have to synchronize the values, and at first of January again
  • I've solved it like this. my children come to me on Fridays odd weeks. at 12:00 on Fridays flip boolean from false to true. 

    Then i use this Boolean value in my flows

    I had to sync this boolean once but then it works
  • glijieglijie Member
    edited November 2017
    JPe said:
    While you are waiting for a solution, you can probably make something yourselves,
    in '''BetterLogic' you make two variables OddWeek as Boolean  and WeekNr  as  Number:



    The first time you have to synchronize the values, and at first of January again
    add a flow to reset everything at the beginning of the year automaticly  like:
    4th of januari is always week 1 (odd week) 


    or 

  • I dont know if Weeknummer is available as a Tag.
    But if it is you could use the  "remainder" calculation.
    AND: Better logic Math.js expression is true ( Weeknummer % 2)   

    It devides the Weeknummer by 2, untill it can no longer do that, so on even weeks, the Remainder is 0, in odd weeks the result is 1
  • JPe said:
    added in next release  <3 :)
    Where did u read that?
  • Ah, was looking at another issue then. Sorry.
Sign In or Register to comment.