Creating a virtual device

I’m still somewhat new to Home-assistant so apologies if this question doesn’t entirely make sense.

I have some automation jobs that run elsewhere on my network (backups, that kind of thing) and I’d like to pull the results of that data into Home-assistant, so I have a central place to monitor things and alert when there are issues.

I’ve set up some scripts which call the event REST endpoint and I can use those to trigger events, but I’d quite like to manage it a bit more cleverly. So my event will send some data like “duration”, “number of files backed up”, “total files in backup” that kind of thing. Is there a relatively sensible way to wrap those up in something in HomeAssistant which looks like a Device with a number of entities on it representing each of those values? I could then graph it, make decisions on it?

I have googled a bit and couldn’t find anything, but apologies in advance if I missed something obvious!

I’d say put all the values in attributes of the sensor.
That’s the best way to keep values together

MQTT

After an hour or so playing with MQTT I think this is a good option for me.

I’m using the MQTTX CLI which seems very slow to connect to the broker, is that normal? Given MQTTX is supposed to be super lightweight I kind of assumed connection would be fast!

Thanks both of you for the hints! I’ve had fun learning a bit about MQTT too :slight_smile:

1 Like