# Highest and lowest outdoors temperature during day

**URL:** <https://community.homey.app/t/highest-and-lowest-outdoors-temperature-during-day/20027>\
**Category:** Flows\
**Created:** [October 31, 2019, 8:34pm UTC](https://community.homey.app/t/highest-and-lowest-outdoors-temperature-during-day/20027 "2019-10-31T20:34:07Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![mrPilloft](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mrpilloft/32/87781_2.png) [@mrPilloft](https://community.homey.app/u/mrPilloft)\
**Post date:** [September 29, 2023, 8:57am UTC](https://community.homey.app/t/highest-and-lowest-outdoors-temperature-during-day/20027/21 "2023-09-29T08:57:00Z")

</div>

> [@Peter\_Kawa](#):
>
> Feel free to try this script, but I doubt the results will differ

Run that inspecting “Living Room” (the SONOS speaker) and it returned:

```auto
Device: Living Room 
Zone: undefined
ID: 5de31c51-771b-46e7-9ed1-5699e9ab8ed9 
Capabilities: speaker_album,speaker_artist,speaker_duration,speaker_next,speaker_playing,speaker_position,speaker_prev,speaker_repeat,volume_set,volume_mute,speaker_shuffle,speaker_track,sonos_group,sonos_line_in,sonos_audio_clip

```

I see that i .zoneName is not avalable, but  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/1/b173fd5d975d062990b16dd014b3a8d3ee9f70d2.png)  
.zone is (returns the zone’s ID)

Thanks again, Peter\_Kawa. Another tool in the box 🙂 👍  
(I have a HP2019 at home, so this will all come to use :- )

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 29, 2023, 12:45pm UTC](https://community.homey.app/t/highest-and-lowest-outdoors-temperature-during-day/20027/22 "2023-09-29T12:45:33Z")

</div>

> [@mrPilloft](#):
>
> I see that i .zoneName is not avalable, but  
> ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/1/b173fd5d975d062990b16dd014b3a8d3ee9f70d2.png)  
> .zone is (returns the zone’s ID)

Ah, same here

 ![Screenshot_20230929-143658_Firefox](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/5/15488f629cf928d81fc0f3f2aee571a0d02393c5.jpeg)

but, on my Pro2019 it returns the zone name anyways when i use i.zoneName 😊

 ![Screenshot_20230929-143615_Firefox](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/5/f5b53b0a66cab48d875c48a4cd8851da8385a49f.jpeg)

And YW.

Find Zone name:

```auto
// Find a zone name, argument = zone ID, text-tag returns name

//let zoneID = args[0]
let zoneID = "855113f1-f488-4223-b675-2f01270f573e"

const myZones = await Homey.zones.getZones();
for (var iMyZone in myZones){
  if (myZones[iMyZone].id == zoneID) {
  log(`Zone name of zone [${myZones[iMyZone].id}]: ${myZones[iMyZone].name}`);
  return(myZones[iMyZone].name);
  }
}

```

---

<div class="post-metadata">

**Author:** ![mrPilloft](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mrpilloft/32/87781_2.png) [@mrPilloft](https://community.homey.app/u/mrPilloft)\
**Post date:** [September 29, 2023, 6:01pm UTC](https://community.homey.app/t/highest-and-lowest-outdoors-temperature-during-day/20027/23 "2023-09-29T18:01:35Z")

</div>

While waiting for the script to start running, I’ve of course accomplished what I set out to do by the use of advanced flow 😄. Here’s how I solved it:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/f/1f56aec8a739ff2f71aeee9da004badcb588d978.png)

But as I’m on a serious learning curve, I would like to get the script running as well…

---

<div class="post-metadata">

**Author:** ![LukasBr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lukasbr/32/81236_2.png) [@LukasBr](https://community.homey.app/u/LukasBr)\
**Post date:** [January 10, 2024, 9:34pm UTC](https://community.homey.app/t/highest-and-lowest-outdoors-temperature-during-day/20027/24 "2024-01-10T21:34:50Z")

</div>

Hi, I had the same issue and I think I figured it out. The ID for the log has to also include the ID for the device, the Insights link for that measurement hinted to that. So that “let entries” line becomes this:

```auto
let entries = await Homey.insights.getLogEntries({uri: "homey:device:e9e57bbd-9181-4396-b41f-47d875de4d03", id: "homey:device:e9e57bbd-9181-4396-b41f-47d875de4d03:measure_temperature", resolution: "last24Hours"});

```

Seems like a weird thing, but it atleast works now.  
Thanks for all the coding help 😃

[Previous page](https://community.homey.app/t/highest-and-lowest-outdoors-temperature-during-day/20027.md?page=1)
