There's two identical timer names, how to remove one?

Issue #23 resolved
Peter Dee created an issue

Hey Arie,

I found two identical timer names, how can I remove the double entry?

I’m trying to discover differences, like a eventually hidden whitespace, but I can’t

Homeyscript only shows one of each:

{
  'lamp badkamer': 'timer',
  lamp_wil_maar_niet_uit: 'timer',
  'lamp berging': 'timer',
  'Growatt opbrengst meldingen': 'timer',
  '@homeMacrodroid': 'timer',
  'Growatt opbrengst melding': 'timer',
  Slaapkamer: 'transition',
  Bijkeukenlamp: 'timer',
  Overloop: 'timer',
  'CV-brander-Rood': 'timer',
  TadoIngesteldeTemp: 'timer',
  MediaPlug: 'timer',
  ToiletLamp: 'timer',
  Eethoek1Btn_LoMidHiOff: 'timer',
  Growatt_0_vermogen: 'timer',
  BatterijCheck: 'timer',
  '1-2 zon €€€ indicator': 'timer',
  vriezer: 'timer',
  koelkast: 'timer',
  'koelkast temp': 'timer',
  '3-7 afzuigkap aan temp': 'timer',
  '4-7 afzuigkap aan vocht': 'timer',
  '5-7 afzuigkap uit temp': 'timer',
  '6-7 afzuigkap uit vocht': 'timer',
  'good-night-light': 'transition',
  rolgordijn_voor: 'timer',
  OvenAANgezet: 'timer',
  OvenUITgegaan: 'timer',
  RegenVerwacht1: 'timer',
  'Luchtdruk.groter': 'timer',
  'Luchtdruk.kleiner': 'timer',
  BeaconsGraceTime: 'timer',
  Beacon_8erdeurWait: 'timer',
  Beacon_Pe_autoWait: 'timer',
  Beacon_LiefWait: 'timer',
  Beacon_GastWait: 'timer',
  HomeyOffline: 'timer',
  PeterSlaaptijd: 'stopwatch',
  cv_monitor: 'timer',
  'Peter@Away': 'stopwatch',
  Koelkastinterval: 'stopwatch',
  TeHogeTemp: 'timer',
  Douchen: 'timer',
  BackupAbboReminder: 'timer',
  InternetDOWN: 'stopwatch',
  EettafelTuya: 'timer',
  EettafelTuyaDelay: 'timer',
  FoonOpladen: 'stopwatch',
  KoffieAANgezet: 'timer',
  KoffieEnMelkAANgezet: 'timer',
  CastTadoTemp: 'timer',
  GasOnveranderd: 'timer',
  VirtHuidigVermogen: 'timer',
  zonlichtsterkte: 'timer',
  'Hal-lamp': 'timer',
  RegenVerwacht2: 'timer',
  ToiletFan: 'timer',
  GrowattStopped: 'timer',
  FanToilet30m: 'timer',
  lux_zonnig: 'timer',
  lux_avond: 'timer',
  lux_ochtend: 'timer',
  'EnergySell ': 'timer',
  EnergyBuy: 'timer',
  HeeftBobRondjeGedaan: 'timer',
  undefined: 'timer'
}


———————————————————
 Script Success

↩️ Returned: undefined

The flows using the 'EnergySell' timer:

https://homey.app/f/9PN9Qw

https://homey.app/f/qftaQw

Your comment: i think i know the issue (both names used in the same flow).

https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/499?u=peter_kawa

Comments (15)

  1. arie repo owner

    Run this in HS

    const dcApp = await Homey.apps.getApp({id:'nl.fellownet.chronograph'});
    let result = await dcApp.apiGet('/allchronographs/');
    log(result);
    

  2. Peter Dee reporter

    You're absolutely right, I was looking with my good eye closed 🥴

    Ran your code, and both do have a duplicate name with trailing space. The duplicates with trailing space are not used in flows, can they be deleted?

    'EnergySell'
    'EnergySell '
    'Bijkeukenlamp'
    'Bijkeukenlamp '
    

  3. arie repo owner

    If they are in the results of my script, they must be used in flows somewere m8, i only get those names from flows.

  4. arie repo owner

    As soon as one flow with a timer is changed, all the timernames are update fresh from the flows, so, somewhere, you must be using those names imho.

  5. Peter Dee reporter

    Thanks for looking into this, Arie. Reading your reply I guess it is not possible to find out with a script in which flow(s) a certain timer is used?

    Or maybe it's possible to run a script which returns all my Chronograph flowcards, with the timernames?

    I've too many flows with Chronograph timers to dig through 😬🤗

  6. Peter Dee reporter

    Maybe it's easier to search for timers without last update timestamp?

    For both timernames, only one of each has a last updated timestamp

  7. arie repo owner

    Well, i tried to change the FindObjectsInFlow script.

    But that’s gonna take to much work tbh, making it dynamic like that.

    Perhaps i can create a script later, but i have some other stuff todo atm.

  8. Log in to comment