-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update sensor properties, update documentation with examples (#11)
* feat: update sensor properties, update documentation with examples * fix: revert hacs.json change
- Loading branch information
1 parent
5f33818
commit e83ccc2
Showing
6 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Show entities on a map | ||
The integration returns a list of sensors, which can be plotted out on a map: | ||
![entities on a map](custom_map-card.png) | ||
|
||
When using the [`custom:map-card`](https://github.com/nathan-gs/ha-map-card) integration, it is possible to add tap actions to the plotted sensors, which then can trigger a navigation event. | ||
|
||
Example map-card configuration, with only one sensor for readability: | ||
```yaml | ||
type: custom:map-card | ||
card_size: 8 | ||
entities: | ||
- entity: sensor.savaanstraat | ||
display: state | ||
tap_action: | ||
action: call-service | ||
service: script.navigate_to_location | ||
data: | ||
entity_id: sensor.savaanstraat | ||
``` | ||
This calls a service [`script.navigate_to_location`](navigate_to_parking.md) which then triggers a Waze url that makes Waze start navigating towards the selected parking. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Navigate to parking script | ||
When setting a tap_action on the map-card component, this is an example of a script that will show a notification on your mobile device.\ | ||
When the notification is tapped, it will launch Waze (must be installed) and start navigating to the selected parking. | ||
|
||
```yaml | ||
alias: Navigate to Location | ||
description: Start Waze navigation to a specific location directly | ||
fields: | ||
entity_id: | ||
selector: | ||
entity: {} | ||
name: Entity ID | ||
sequence: | ||
- variables: | ||
latitude: "{{ state_attr(entity_id, 'latitude') }}" | ||
longitude: "{{ state_attr(entity_id, 'longitude') }}" | ||
location: "{{ state_attr(entity_id, 'friendly_name') }}" | ||
- data: | ||
message: "Navigate to: {{ location }}" | ||
data: | ||
url: | | ||
waze://?ll={{ latitude | float }},{{ longitude | float }}&navigate=yes | ||
action: notify.notify | ||
``` | ||
Other navigation applications are also possible, just need to replace the url with the appropriate one for the other navigation application. |