https://github.com/jfk20/ha-draw
A Card which implements tldarw into Home Assistent
https://github.com/jfk20/ha-draw
hacs hacs-plugin home-assistant home-assistant-component home-assistant-frontend react tldraw
Last synced: 25 days ago
JSON representation
A Card which implements tldarw into Home Assistent
- Host: GitHub
- URL: https://github.com/jfk20/ha-draw
- Owner: JFK20
- Created: 2024-11-06T08:35:58.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-01-24T23:22:16.000Z (3 months ago)
- Last Synced: 2025-03-25T01:44:11.512Z (about 1 month ago)
- Topics: hacs, hacs-plugin, home-assistant, home-assistant-component, home-assistant-frontend, react, tldraw
- Language: TypeScript
- Homepage:
- Size: 66.5 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Home Assistant: ha-draw
This project was bootstrapped from the [homeassistant-react-lovelace](https://github.com/samuelthng/homeassistant-react-lovelace) Repo which provides a minimal setup to get vite working in Home Assistant with some ESLint rules.
## To add to Lovelace:
### Install via HACS
1. Add this repository as a custom repository in HACS.
2. Install the ha-draw card via HACS.
3. Reload your Home Assistant.
4. Create your custom card## Create Custom Card
```yaml
- type: custom:ha-draw
name: filename_addition #the addition to the filename
groups:
- entities: #a list of entities when one of them changes the tldraw Component is updated
- sensor.plug_pcsetup_leistung
template: | #the Template which Result Value is used on the parameter
{{ states('sensor.plug_pcsetup_leistung', with_unit=true) }}
tldraw:
ids:
- MUdaPeWuusluTr7_5Ri5A #the ID of the Shape without shape:
parameter: props.text #the parameter of the tldraw Component which is changed
valuetype: current # current or absolut. current is the current value.
#Absolute adds the values just possible with numbers
on_error: previous #if previous the last working value is displayed
- entities:
- sensor.plug_minipc_leistung
template: |
{% if states('sensor.plug_minipc_leistung') | float > 7 %}
red
{% else %}
green
{% endif %}
tldraw:
ids:
- Sh5qeuGuvPte75xd4euyN
parameter: props.color
valuetype: current
on_error: previous
```
> Note: Be sure to open Home Assistant using its local address if your component does not seem to update after inserting a new version.