Hi everybody
I’ve created an Entity Button Card
in Lovelace. Setting the tap-action
to call-service
: modbus.write_register
.
I’m filling ind the required data for the modbus.write_register
requirements found at Modbus - Home Assistant.
This is done in the service_data
Altogether I end up with the following:
type: entity-button
tap_action:
action: call-service
service: modbus.write_register
service_data:
name: Nilan
unit: 1
address: 20180
value: 1
hold_action:
action: none
show_icon: true
show_name: true
entity: sensor.allow_active_cooling
But it gives an error when pressing the button:
extra keys not allowed @ data[‘name’]
Traceback (most recent call last):
File “/usr/src/app/homeassistant/components/websocket_api/commands.py”, line 121, in handle_call_service
connection.context(msg))
File “/usr/src/app/homeassistant/core.py”, line 1130, in async_call
processed_data = handler.schema(service_data)
File “/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py”, line 267, in call
return self._compiled(, data)
File “/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py”, line 589, in validate_dict
return base_validate(path, iteritems(data), out)
File “/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py”, line 427, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data[‘name’]
How to proceed? I’m a little lost.
Thanks in advance!
PS: Hope I’ve formatted everything correctly. I’ve also tried to search the community, but to no avail.