Hi
Im trying to figure out how to make my google home to report a state from a sensor. Ive been reading for days, and tried all sorts of things, but I allways gets an error. I am new to home assistant, so please be gentle D:
I dont know if a script is the best way to achieve this. I have tried alot of different sensors, and
this is just for testing purpose, but here is my code anyway:
data:
data_template:
message: >-
Godmorning battery is now {{
states('sensor.sensative_strips_battery_level') }} . Have a nice day.
entity_id: media_player.nesthub5946
service: tts.google_say
And here is my log with error:
Logger: homeassistant.components.websocket_api.http.connection.547795964624
Integration: websocket_api (documentation, issues)
First occured: 10:05:10 AM (24 occurences)
Last logged: 10:51:38 AM
extra keys not allowed @ data['data_template']
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 134, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1230, in async_call
await asyncio.shield(self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 207, in service_handler
await script.async_turn_on(variables=service.data, context=service.context)
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 288, in async_turn_on
raise err
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 283, in async_turn_on
await self.script.async_run(kwargs.get(ATTR_VARIABLES), context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 247, in async_run
await self._handle_action(action, variables, context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 331, in _handle_action
await self._actions[_determine_action(action)](action, variables, context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 413, in _async_call_service
context=context,
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 101, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context
File "/usr/src/homeassistant/homeassistant/core.py", line 1208, in async_call
processed_data = handler.schema(service_data)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['data_template']
This is my first post on this forum, so im not very familiar with best way of formatting of code etc…
please help me