Hmm, this is indeed interesting. I think I can see where they are going but I am not totally sure.
I would describe the virtual devices as being like a wrapper for capabilities. Something like the standard virtual switch has the switch and refresh capabilities with the usual switch attribute and on and off commands so works rather like we are used to. However the standard virtual presence only has the presenceSensor and refresh capabilities so there arenβt any commands to set the presence attribute. The only way to do that seems to be to use the API to send the events (and I found that I had to be the Location owner for those to work). So that isnβt what we are used to, but why should it be?
I havenβt looked to see if the commands implemented are limited to enum and setter commands, which obviously have a direct correspondence with certain attributes. I guess there could be more fancy command mapping to come. Similarly Iβd imagine there will the a cloud v local option in future.
On iOS, I can get this with these virtual devices: when I create one, it may show up right away in the mobile and you can tap on it to go into device Controls, but I may get nothing but a blank page - not even a way to navigate back out. The only option is to shut down the app and restart. I repeated this procedure several time last evening then gave up. Today, the device is properly displaying and functional.
Hereβs a bit of an anomoly: if you create a refrigerator virtual device, it uses the thermostatCoolingSetpoint capability in both the main and freezer components. However that capability only allows you to set it to a low of freezing (32 degrees F / 0 degrees C). Not very useful for a freezer thermostat where you typically have it a few degrees BELOW freezing.
Have you checked if changing the range in the device-config helps? The capability definition allows a range of -460 - 10000 but I know this and heatingSetpoint are a little tricky, specially related to the unit used in the location and the events.
How would I do this? I see the range in the device presentation and I donβt know how to change that short of creating a custom capability and presentation.
What are you referring to here? An option would be to create a custom capability but remember those are not supported in some third-party integrations like Alexa.
To change the range of a capability (this affects only the presentation, not the definition), you need to do something like this in the device-config to create a custom presentation:
Note: The value in step depends on the βjumpsβ you want to allow for the - and + symbols. This way, the value will increase/decrease in that amount. For example,if itβs 0.5, the value will change between 12.0 to 12.5
I see that Isabelle has created a pull request for a Virtual Switch driver (covers switch, dimmer and dimmer-switch). Looks stateless to match the DTH. Interesting.