travisghansen / hass-opnsense

OPNsense integration with Home Assistant
194 stars 25 forks source link

WoL doesn't work #129

Closed RonnyB1978 closed 6 months ago

RonnyB1978 commented 6 months ago

When want to send the Wake on LAN command to my devise, I got this error in Home Assistant

extra keys not allowed @ data['data']. Got None required key not provided @ data['interface']. Got None required key not provided @ data['mac']. Got None

Is this an issue of these plugin?

Thanks for help. issue

belgianrubs commented 6 months ago

Hi, can you show how you performed the execution of the service (parameters used)? It seems that you formatted it incorrectly.

travisghansen commented 6 months ago

123

RonnyB1978 commented 6 months ago

In advance: Thank you for helping me. Attached my config

service: opnsense.send_wol data: data: entity_id: binary_sensor.opnsense_localdomain_pending_notices_present interface: lan mac: 04:7C:16:EE:BA:E8

as yaml code and here as a picture

format

belgianrubs commented 6 months ago

I don't think the "data" needs to be in front of the entity_id, interface and mac. If you switch to the full YAML-mode by pressing the button below this screenshot, I believe it's normally added automatically.

travisghansen commented 6 months ago

Is that a valid entity_id? Its from the examples and may not be valid in your install/setup. Select an entity from the dropdown and try.

RonnyB1978 commented 6 months ago

@travisghansen : Sorry. You are right. I correct it. But now I got unknown error?

new code is

service: opnsense.send_wol metadata: {} data: entity_id: binary_sensor.opnsense_pending_notices_present interface: lan mac: "04:7C:16:EE:BA:E8"

new

belgianrubs commented 6 months ago

Have you updated to the latest version?

travisghansen commented 6 months ago

The hass logs when the unknown error happens may help as well.

RonnyB1978 commented 6 months ago

@travisghansen @belgianrubs : You are my heros. I updated to version 0.1.19 and correct my mistake in config. Now it's working very well.

THANKS and have a nice weekend.

Ronny