Skip to content

Commit

Permalink
Merge pull request #1 from KTibow/master
Browse files Browse the repository at this point in the history
Random stuff
  • Loading branch information
nielsfaber committed Aug 13, 2020
2 parents 7f19b3b + b617787 commit bc9d149
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Validate

on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- name: HACS validation
uses: "hacs/integration/action@master"
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CATEGORY: "plugin"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# scheduler-card

[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg)](https://github.com/custom-components/hacs)
This project is still a work-in-progress. Feel free to use it, but some functions may contain bugs at this point.

## Introduction
This is a Lovelace card for Homeassistant that can be used to create a time schedule for your smart devices.
This is a Lovelace card for Home Assistant that can be used to create a time schedule for your smart devices.
You can create new rules, modify existing rules and temporarily disable rules.

The card works on top of the [scheduler custom component](https://github.com/nielsfaber/scheduler-component). You *will* need it this as well.
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 9 additions & 3 deletions scheduler-card/scheduler-card.js → dist/scheduler-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class SchedulerCard extends LitElement {
return Object.values(this.config.Groups()).map(el => {
return html`
<mwc-button class="${this.selection.group == el.id ? ' active' : ''}" @click="${(e) => { this.selectGroup(el.id) }}">
<ha-icon icon="mdi:${el.icon}"></ha-icon>
<ha-icon icon="mdi:${el.icon}" class="padded-right"></ha-icon>
${el.name}
</mwc-button>
`;
Expand All @@ -119,7 +119,7 @@ class SchedulerCard extends LitElement {
return this.config.Groups(this.selection.group).entities.map(el => {
return html`
<mwc-button class="${this.selection.entity == el ? ' active' : ''}" @click="${(e) => { this.selectEntity(el.id) }}">
<ha-icon icon="mdi:${el.icon}"></ha-icon>
<ha-icon icon="mdi:${el.icon}" class="padded-right"></ha-icon>
${el.name}
</mwc-button>
`;
Expand All @@ -132,7 +132,7 @@ class SchedulerCard extends LitElement {
return this.selection.entity.GetActions().map(el => {
return html`
<mwc-button class="${this.selection.action == el ? ' active' : ''}" @click="${(e) => { this.selectAction(el.id) }}">
<ha-icon icon="mdi:${el.icon}"></ha-icon>
<ha-icon icon="mdi:${el.icon}" class="padded-right"></ha-icon>
${el.name}
</mwc-button>
`;
Expand Down Expand Up @@ -682,10 +682,16 @@ class SchedulerCard extends LitElement {
div.option-item {
padding: 2px 5px;
}
.padded-right {
margin-right: 11px;
}
</style>
`;
}
}

customElements.define('scheduler-card', SchedulerCard);

window.customCards.push({type: 'scheduler-card', name: 'Scheduler', description: 'Card to help with scheduling.'});
4 changes: 4 additions & 0 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Scheduler Card",
"render_readme": "true"
}
1 change: 0 additions & 1 deletion scheduler-card/README.md

This file was deleted.

Binary file modified screenshots/Demonstration.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/Screenshot_Editor_1.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/Screenshot_Editor_2.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/Screenshot_Overview.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bc9d149

Please sign in to comment.