Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igor-podpalchenko/ha-weekly-schedule-card
Home Assistant Weekly Schedule Card
https://github.com/igor-podpalchenko/ha-weekly-schedule-card
card hacs home-assistant homeassistant iot javascript lovelace-card mqtt schedule
Last synced: 28 days ago
JSON representation
Home Assistant Weekly Schedule Card
- Host: GitHub
- URL: https://github.com/igor-podpalchenko/ha-weekly-schedule-card
- Owner: igor-podpalchenko
- Created: 2024-07-30T09:37:04.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-07-30T16:21:11.000Z (3 months ago)
- Last Synced: 2024-09-29T18:52:08.010Z (about 1 month ago)
- Topics: card, hacs, home-assistant, homeassistant, iot, javascript, lovelace-card, mqtt, schedule
- Language: JavaScript
- Homepage:
- Size: 191 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Weekly Schedule Card
![Weekly Schedule UI](images/weekly-schedule-ui.png)
[![GitHub Release][gh-release-image]][gh-release-url]
[![GitHub Downloads][gh-downloads-image]][gh-downloads-url]The Weekly Schedule Card is a simple custom card for Home Assistant that allows you to display and manage a weekly schedule for various devices (like thermostats, air conditioners).
It supports different input and output formats but does not contain a schedule executor service (like cron). It might be used with the MQTT device type.
To understand it better or integrate it, enable `devMode`.## Options
### Option 1: Static Schedule
```yaml
type: custom:weekly-schedule-card
devMode: false
encodingSchema: Devi
entity: >-
{"MON":[],"TUE":["84cB","8D90","93d6"],"WED":["86d1"],"THU":[],"FRI":["8E91"],"SAT":[],"SUN":[]}
```- **type**: Defines the card type. For this card, it should be `custom:weekly-schedule-card`.
- **devMode**: Enables developer mode. Set to `false` for this option.
- **encodingSchema**: Specifies the encoding schema used for the schedule. In this example, it is set to `Devi`.
- **entity**: A JSON string representing the schedule for each day of the week. Each day can have multiple time slots encoded in the `Devi` format.### Option 2: Dynamic Schedule
```yaml
type: custom:weekly-schedule-card
devMode: true
encodingSchema: Devi
commandTopic: bluetti/command/AC70-2403000094022/test_json
entity: sensor.ac70_test_json
```- **type**: Defines the card type. For this card, it should be `custom:weekly-schedule-card`.
- **devMode**: Enables developer mode. Set to `true` for this option.
- **encodingSchema**: Specifies the encoding schema used for the schedule. In this example, it is set to `Devi`.
- **commandTopic**: MQTT topic to which the schedule will be published.
- **entity**: Entity ID of the sensor that contains the schedule in JSON format.## Installation Instructions
### Manual Installation
Add the following to your `configuration.yaml` file:
```yaml
lovelace:
mode: yaml
resources:
- url: /hacsfiles/ha-weekly-schedule-card/weekly-schedule-card.js
type: module
```### HACS Installation
1. Install the card using HACS (Home Assistant Community Store).
2. Add the resource URL to your Lovelace configuration as shown above. (guide: https://hacs.xyz/docs/faq/custom_repositories/)
3. Add repo URL: https://github.com/igor-podpalchenko/ha-weekly-schedule-card/
4. Install the weekly schedule card## Example Configuration
```yaml
type: custom:weekly-schedule-card
devMode: true
encodingSchema: Devi
commandTopic: bluetti/command/AC70-2403000094022/test_json
entity: sensor.ac70_test_json
```## Usage
After adding the configuration to your Lovelace dashboard, you can interact with the weekly schedule by clicking on the time slots to select or deselect them. The selected slots will be highlighted, and you can update the schedule by clicking the "Update" button.
### Developer Mode
- **devMode**: When set to `true`, enables additional options for testing and debugging.
- **encodingSchema**: You can choose between different encoding schemas (`JSON`, `Devi`, `Bitmask`, `All`) for the schedule data.
- **scheduleOutput**: Displays the current schedule in the selected encoding schema.
- **applyScheduleButton**: Applies the current schedule to the table.### Encoding Schemas
- **JSON**: Standard JSON format for schedule representation.
- **Devi**: Custom encoding schema for specific use cases.
- **Bitmask**: Binary representation of the schedule.
- **All**: Displays the schedule in all available schemas.### Schedule Management
- **Add Time Slots**: Click on the desired time slots to select them.
- **Remove Time Slots**: Click on the selected time slots to deselect them.
- **Reset Day Schedule**: Click on the day label to reset the schedule for that day.
- **Update Schedule**: Click the "Update" button to save changes to the schedule.## Troubleshooting
- Ensure the card is added as a resource in your Lovelace configuration.
- Verify the `entity` and `commandTopic` configurations.
- Check the browser console for any error messages if the card does not render correctly.By following the instructions above, you can easily integrate and use the Weekly Schedule Card in your Home Assistant setup.
[gh-release-url]: https://github.com/igor-podpalchenko/ha-weekly-schedule-card/releases/latest
[gh-release-image]: https://img.shields.io/github/v/release/igor-podpalchenko/ha-weekly-schedule-card?style=flat-square
[gh-downloads-url]: https://github.com/igor-podpalchenko/ha-weekly-schedule-card/releases
[gh-downloads-image]: https://img.shields.io/github/downloads/igor-podpalchenko/ha-weekly-schedule-card/total?style=flat-square