sh00t2kill / linktap_local_http_component

A Custom Component that uses the linktap local HTTP API
26 stars 3 forks source link

Syntax for service data? #43

Closed phurth closed 4 months ago

phurth commented 4 months ago

Hi! I'm trying to test the service to start watering with a duration. I've tried a couple of different things in the service data (duration: 86399, 86399, duration:'86399') but I'm getting an error:

Failed to call service linktap.start_watering. extra keys not allowed @ data['duration']. Got None I assume I'm just not getting the syntax correct. What should it be?

Here's an example of my service call from dev tools:

service: linktap.start_watering
target:
  entity_id: valve.linktap_taplinker
data:
  duration: 86399
sh00t2kill commented 4 months ago

Use seconds in place of duration.

Note that in general I would recommend setting the number entity and then switching the switch or valve over using the service call.