Comments (4)
OK. I see that set_service_value()
is actually an action call that accepts a single parameter, and can only execute actions the name of which begins with the string "Set". That's... interesting. It still doesn't address other actions, or multiple parameters.
from pyvera.
call_service
gives access to the full api where needed set_service_value
is largely there because most of the devices only needed this reduced functionality, so when the call_service
call was added we retained this for DRY reasons.
Open to a PR if you feel something more functional than set_service_value
but less rich than call_service
is required.
Closing this for now.
from pyvera.
call_service gives access to the full api
OK. What am I missing? Let me give an example:
The RunLua
action in urn:micasaverde-com:serviceId:HomeAutomationGateway1
accepts (requires) a single parameter, Code
, which contains the Lua fragment to run.
It is not possible to use set_service_value()
to run this action because the name of the action does not begin with "Set", which is hard-coded in that function (i.e. the function would make a Luup request for to run the SetRunLua
action, which does not exist).
The call_service()
function does not accept parameters, so you can try to invoke the RunLua request using it, but you cannot pass the required Code
parameter that contains the Lua code to be run, because the function does not accept (and therefore does not append to the request) parameters for the action.
Not all actions are related to state variables. Not all actions that take parameters are named "Set" plus the parameter/state variable name. Not all actions take zero or 1 parameters. These are all assumptions and limitations of these two calls as currently written.
I'll open a PR.
from pyvera.
My note should have referred to vera_request
rather than call_service
, apologies.
Generally I think it's good practice to add parameters as they are needed, so no problem adding an extra parameter if you need it for something.
from pyvera.
Related Issues (20)
- VeraDimmer.turn_on() overwrites previous brightness HOT 1
- More metadata about battery and communication status HOT 1
- The "complex" variable functions do not consider service Id HOT 8
- variableset request--set the value of a state variable HOT 1
- Use of Fibaro Zwave Key Fob Remote HOT 2
- pyvera not updating HA; device_list is always empty HOT 21
- Vera 7.3 firmware Beta & pyvera HOT 2
- Support for Power meter (pulse counter)
- Frequently fails on Home Assistant restart with "Entity already exists" HOT 6
- Vera 7.31 breaks thermostat? HOT 5
- Possible async issues in pyvera exposed by home assistant HOT 10
- Support for control of RGBWW devices such as Aeontec ZW098. HOT 7
- Unhandled exceptions in pyvera (HA AssertionError) HOT 3
- Sole owner on pypi? HOT 1
- pyvera install HOT 23
- comm_failure method incorrectly returns True when CommFailure variable not present in Vera response HOT 4
- Do a better job at handling Comms Failure (esp in Home Assistant) HOT 21
- Problem parsing pin code string HOT 1
- Update to Python 3.9, upgrade pylint mypi etc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvera.