hass-virtual
hass-virtual copied to clipboard
Where is the why and the how?
I chanced upon this because I'm looking for a way to minimize the effort to replace devices without modifying a bunch of automations and modifying my config.
e.g. I have a card that shows my tablet and phone's batteries also a automation to monitor its battery levels.
- So let's say I changed my phone, does this repo help reduce the overheads by just modifying stuff under
virtual:to point to the new phone? - If not, is there a write up on why this virtual concept exists? What problem is it trying to solve?
- If it is, then next is, how do I get the virtual values to follow that of the real values?
- Examples show all the various types, but does not show how I can connect virtual to the real link so that they are in sync
Thank you!
- Maybe. Give it a try and let me know. It might be easier to change the device entity IDs.
- It scratches an itch I had. I have a lot of code running in
appdaemonso I wanted to be able to test any changes I made before I deployed it to the "real" house. It kind of grew as I added things and I added it to HACS in case other people found it useful. - See 4.
- When I wrote it I didn't really have that in mind but I looked at my main system and I have a couple of devices that are actually virtual. One of them is a swimming pool cover which I can't reasonably attached a sensor to but has a service which will email when I open and close the pool. For this one I:
- set up an email address to receive these emails
- had that email address pipe to a python script that examines the contents
- call my Home Assistant rest API to signal if the the cover was opened or closed
- the rest API automation calls a
virtualservice to set the new state
- (continued) It's an interesting idea being able to tie it to a another device. For now you could probably do it with an automation.
Hope that helps.