@@ -32,12 +32,12 @@ import java.util.concurrent.Semaphore
3232// ************************************************
3333// * STATIC VARIABLES *
3434// ************************************************
35- @Field static final String appVersionFLD = ' 4.3.0.0 '
35+ @Field static final String appVersionFLD = ' 4.3.0.1 '
3636@Field static final String appModifiedFLD = ' 2025-09-09'
3737@Field static final String gitBranchFLD = ' master'
3838@Field static final String platformFLD = ' Hubitat'
3939@Field static final Boolean devModeFLD = false
40- @Field static final Map<String ,Integer > minVersionsFLD = [echoDevice : 4300 , actionApp : 4300 , zoneApp : 4300 , zoneEchoDevice : 4300 , server : 270 ] // These values define the minimum versions of code this app will work with.
40+ @Field static final Map<String ,Integer > minVersionsFLD = [echoDevice : 4301 , actionApp : 4301 , zoneApp : 4301 , zoneEchoDevice : 4301 , server : 270 ] // These values define the minimum versions of code this app will work with.
4141
4242@Field static final String sNULL = (String )null
4343@Field static final String sBLANK = ' '
@@ -1703,8 +1703,15 @@ Boolean checkIfCodeUpdated() {
17031703 }
17041704 List cDevs = getEsDevices()
17051705 if (cDevs?. size()) {
1706- String ver = (String )cDevs[iZ]?. devVersion()
1707- if ((String )codeVerMap. echoDevice != ver) {
1706+ String ver = null
1707+ // Iterate through devices until we find one that returns a version (In case the device is disabled in hubitat)
1708+ for (dev in cDevs) {
1709+ if (dev) {
1710+ ver = (String )dev?. devVersion()
1711+ if (ver) break
1712+ }
1713+ }
1714+ if (ver && (String )codeVerMap. echoDevice != ver) {
17081715 chgs. push(" echoDevice" )
17091716 state. pollBlocked = true
17101717 updCodeVerMap(" echoDevice" , ver)
@@ -1722,8 +1729,15 @@ Boolean checkIfCodeUpdated() {
17221729 // }
17231730 List cApps = getActionApps()
17241731 if (cApps?. size()) {
1725- String ver = (String )cApps[iZ]?. appVersion()
1726- if ((String )codeVerMap. actionApp != ver) {
1732+ String ver = null
1733+ // Iterate through apps until we find one that returns a version (In case the app is disabled in hubitat)
1734+ for (app in cApps) {
1735+ if (app) {
1736+ ver = (String )app?. appVersion()
1737+ if (ver) break
1738+ }
1739+ }
1740+ if (ver && (String )codeVerMap. actionApp != ver) {
17271741 chgs. push(" actionApp" )
17281742 state. pollBlocked = true
17291743 updCodeVerMap(" actionApp" , ver)
@@ -1732,16 +1746,28 @@ Boolean checkIfCodeUpdated() {
17321746 }
17331747 List zApps = getZoneApps()
17341748 if (zApps?. size()) {
1735- String ver; ver = (String )zApps[iZ]?. appVersion()
1736- if ((String )codeVerMap. zoneApp != ver) {
1749+ String ver = null
1750+ // Iterate through apps until we find one that returns a version (In case the app is disabled in hubitat)
1751+ for (app in zApps) {
1752+ if (app) {
1753+ ver = (String )app?. appVersion()
1754+ if (ver) break
1755+ }
1756+ }
1757+ if (ver && (String )codeVerMap. zoneApp != ver) {
17371758 chgs. push(" zoneApp" )
17381759 state. pollBlocked = true
17391760 // log.debug "zoneVer: ver"
17401761 updCodeVerMap(" zoneApp" , ver)
17411762 codeUpdated = true
17421763 }
17431764 ver = sNULL
1744- zApps. each { if (! ver) ver = it?. relayDevVersion() }
1765+ for (app in zApps) {
1766+ if (app) {
1767+ ver = (String )app?. relayDevVersion()
1768+ if (ver) break
1769+ }
1770+ }
17451771 if (ver && (String )codeVerMap. zoneEchoDevice != ver) {
17461772 chgs. push(" zoneEchoDevice" )
17471773 state. pollBlocked = true
0 commit comments