[Migrated to Custom Capabilities] Rooms Manager: Smarter Rooms: Personalized rules based home automation with rooms Occupancy sensing from devices you already have in your home

cool. open rooms manager app in the IDE and replace these lines:

section("Announce only between hours:")     {
    if (playerDevice)        {
        input "startHH", "number", title: "From hour?", description: "2 digit hour in 24 hour format", required: true, multiple: false, defaultValue: 7, range: "1..${(endHH ?: 23)}", submitOnChange: true
        input "endHH", "number", title: "To hour?", description: "2 digit hour in 24 hour format", required: true, multiple: false, defaultValue: 23, range: "${(startHH ?: 23)}..23", submitOnChange: true
    }
    else        {
        paragraph "Announce from hour?\nselect either presence or time announcement to set"
        paragraph "Announce to hour?\nselect either presence or time announcement to set"
    }
}

with these lines:

section("Announce only between hours:")     {
    if (playerDevice)        {
        input "startHH", "number", title: "From hour?", description: "2 digit hour in 24 hour format", required: true
        input "endHH", "number", title: "To hour?", description: "2 digit hour in 24 hour format", required: true
    }
    else        {
        paragraph "Announce from hour?\nselect either presence or time announcement to set"
        paragraph "Announce to hour?\nselect either presence or time announcement to set"
    }
}

save and publish the app then open the rooms manager app … lets see if the same error shows up.

Error message went away

awesome. put in 7 and 23 respectively and save it.

then reverse the line replacement above. then open the rooms manager app … does the error come back?

7/23 entered then reversed and save it. The error did not come back

1 Like

enjoy! :slight_smile:

Thanks a bunch. Quick question. If I want the announcements available at all times can I change the 7/23 to 7/7 or 12/12 something like that?

1 Like

you are welcome.

try 0 / 23 … if it does not work i am always here. :slight_smile:

GOT IT! Nice work

update from github before you use 0 / 23 :wink:

CRAP! I changed it to 0/23 and the error came back

it allowed you to save it with 0 / 23?

update from github and try it before trying the previous code replacement.

Went I hit save, it I think it allowed me to save it (cant remember). But I backed out then tried to go back in and I got the error message

yeah backing out isnt generally a good idea in ST :slight_smile:

update from github and try it before trying the previous code replacement.

ok. I updated from GitHub. About to do the code replacement. Be right back

wait dont do the code replacement yet.

first try with new code from github.

Sorry, just did it.

just update from github again and try it.

Ok…updated tried again. No error message. Now I am so afraid to touch anything. Don’t wont to break it again…lol

LOL … just dont back out on error. anyways you wont be able to make this error come back again … since i made 0 a valid hour :wink:

:joy: I sure hope not