Hello,
Hi
Have searched everywhere but not found any explanation, therefore I write if there is anyone who knows about this.
Is it possible to send a card from HA to the homekit. Given that everyone in the family should be able to use it.
Thanks
Hello,
Hi
Have searched everywhere but not found any explanation, therefore I write if there is anyone who knows about this.
Is it possible to send a card from HA to the homekit. Given that everyone in the family should be able to use it.
Thanks
What is exactly behind that “food” card? You can’t pass a card to Homekit, what you could do is pass their entites. But you have to configure it through yaml.
Example:
homekit:
include_entities:
- binary_sensor.living_room_motion
More explanaition here:
Hope I got your point, if not feel free to ask again, I’ll reply as soon as possible.
Sirez
Hi
This is behind.
type: entity-button
hold_action:
action: food
icon: haas:bell
icon_height: 50px
name: Food
show_icon: true
show_name: true
tap_action:
action: call-service
service: tts.google_translate_say
service_data:
entity_id: all
volum_set: 0.05
language: sv
message: Food
you cannot pass services to HomeKit. You can only pass the entities/integrations listed as supported in the HA HomeKit integration.
What you could do is create a dummy switch that you can expose in HomeKit, then in HA create an automation that calls the same tts service that your “food” card calls.
Okej, iam new to this and i don’t know how to make this?
You could use an Input Boolean.
Add this to your config:
input_boolean: ""
Restart HA
After this you can create helper variables: Configuration -> Helpers
And then you can create a new automation which calls the service.
After this don’t forget to add it to your homekit integration config!
homekit:
filter:
include_entities:
- input_boolean.callservice
or if you plan to use more boolean helpers include the whole domain
homekit:
filter:
include_domains:
- input_boolean
Hi again,
Thanks i will try this. I have also on more question about this, is some way to remove from all sonos speaker food sound after it was send.
In your automation action you should do the following actions in order:
I’ll update later with what my automation action section looks like.
This sequence snapshots whatever was playing before the message, plays your message, then restores the state before the message.
EDIT: Here’s my automation action that speaks to all of my Sonos speakers then restores their previous state
- service: sonos.snapshot
data:
entity_id:
- media_player.kitchen
- media_player.living_room
with_group: true
- service: sonos.join
data:
master: media_player.kitchen
entity_id: media_player.living_room
- service: media_player.volume_set
data:
entity_id:
- media_player.kitchen
- media_player.living_room
volume_level: 0.7
- service: tts.google_translate_say
data_template:
entity_id: media_player.kitchen
message: >
The National Weather Service has issued a {{ state_attr('sensor.nws_alerts','spoken_desc').split('\n\n-\n\n')[0] }} for our area.
- delay:
seconds: 2
- wait_template: "{{ is_state('media_player.kitchen','paused') }}"
- service: sonos.restore
data:
entity_id:
- media_player.kitchen
- media_player.living_room
with_group: true
EDIT 2: You don’t have to do the Sonos join. You can always provide the tts service or the play_media service with a list of entities like:
entity_id:
- media_player.player_1
- media_player.player_2
- media_player.player_3
...
Hi i recive 2 errors
food: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data[‘volum_set’]
And
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 409, in async_trigger
await self.action_script.async_run(variables, trigger_context)
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 790, in async_run
await asyncio.shield(run.async_run())
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 185, in async_run
await self._async_step(log_exceptions=False)
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 193, in _async_step
await getattr(
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 382, in _async_call_service_step
await service_task
File “/usr/src/homeassistant/homeassistant/core.py”, line 1235, in async_call
processed_data = handler.schema(service_data)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 272, in call
return self._compiled([], data)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data[‘volum_set’]
Please post the full script, the full error log and format both properly in your post.
EDIT: it needs to be volume_set
You’re missing the e in volume.
this is one
Logger: homeassistant.components.automation
Source: helpers/script.py:200
Integration: Automation (documentation, issues)
First occurred: 1:44:51 PM (1 occurrences)
Last logged: 1:44:51 PM
food: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data[‘volume_set’]
and the other
Logger: homeassistant.components.automation
Source: core.py:1235
Integration: Automation (documentation, issues)
First occurred: 1:44:51 PM (1 occurrences)
Last logged: 1:44:51 PM
While executing automation automation.food
Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 409, in async_trigger await self.action_script.async_run(variables, trigger_context) File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 790, in async_run await asyncio.shield(run.async_run()) File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 185, in async_run await self._async_step(log_exceptions=False) File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 193, in _async_step await getattr( File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 382, in _async_call_service_step await service_task File “/usr/src/homeassistant/homeassistant/core.py”, line 1235, in async_call processed_data = handler.schema(service_data) File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 272, in call return self._compiled([], data) File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 594, in validate_dict return base_validate(path, iteritems(data), out) File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data[‘volume_set’]
post the full script, otherwise we’re guessing what’s wrong. and post it in preformatted text by pressing the </>
button and pasting between the back ticks.
with script? this one?
edit. this is all I have
I don’t think this service can take the volume_set: 0.05
option. I could be wrong though.
Hi
know is working this way, I want to put in that after is restoring to before playlist
I think you should start a new thread as this has nothing to do with the original post.
But even better imo would be if you start playing around with the Developer Tools, read the Docs and try to understand how everything glues together smoothly to your needs. —
thanks for everything
You’re welcome mate!