Replies: 2 comments
-
Just in case some gets here like me and wonder: |
Beta Was this translation helpful? Give feedback.
-
I guess you are trying to create https://github.com/louislam/uptime-kuma |
Beta Was this translation helpful? Give feedback.
-
I am writing a simple monitoring tool for some HA and non-HA services. Since HA is a state machine I will outsource the heavy lifting to HA. My question is related to a HTTP monitor but is not specific (I want to use a concrete example to show my issue).
I was planning, based on a configuration file, to first create entities, and then periodically check the helth of the endpoints and update the state accordingly. The code is
Using the configuration file
I get two entities for each entry: the one explicitly created at startup and the one created as a side effect of setting a state:
The correct entry is the second one (with states
ok
orfailed
) and my question is: why are they duplicated?I would appreciate any pointers, finding detailed information about entities IDs is not simple.
PS. Now that I think of it, I do not need to explicitly create the entities and just rely on setting the state (which will prevent the creation of multiple entities) - but I am curious to understand the details anyway.
Beta Was this translation helpful? Give feedback.
All reactions