I am working on my hs website, and I am trying to color code my alarm status to red and green depending on armed or disarmed. I receive an email from my monitoring company that either says "authorized arm by (whoever arms, ie beach)" or "authorized disarm by (whoever disarms)" I would like to parse the phrases so that all the script sees is "authorized arm". If it sees this, the color is red. If not, it is green. Here is what I have so far. \
if body="Authorized Arm by Beach" then
hs.setDeviceString "E1","<font color='green'>body</font>"
else hs.setDeviceString "E1",body
end if
hs.setdeviceString "E2",date
It only puts in the word "body" instead of the value of body, which would be either arm or disarm.
if body="Authorized Arm by Beach" then
hs.setDeviceString "E1","<font color='green'>body</font>"
else hs.setDeviceString "E1",body
end if
hs.setdeviceString "E2",date
It only puts in the word "body" instead of the value of body, which would be either arm or disarm.
Comment