Skip to content

Commit

Permalink
add console version
Browse files Browse the repository at this point in the history
  • Loading branch information
iantrich committed Nov 3, 2019
1 parent 3e91f20 commit 8066fca
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ This card is for [Lovelace](https://www.home-assistant.io/lovelace) on [Home Ass

![example](example.png)

## Installation

Use [HACS](https://hacs.xyz) or follow this [guide](https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins)

```yaml
resources:
url: /local/roku-card.js
type: module
```
## Options
| Name | Type | Requirement | Description |
Expand Down Expand Up @@ -84,16 +94,6 @@ This card is for [Lovelace](https://www.home-assistant.io/lovelace) on [Home Ass
| `haptic` | `string` | none | `success`, `warning`, `failure`, `light`, `medium`, `heavy`, `selection` | Haptic feedback for the [Beta IOS App](http://home-assistant.io/ios/beta) |
| `repeat` | `number` | none | eg: `500` | How often to repeat the `hold_action` in milliseconds. |

## Installation

Use [HACS](https://hacs.xyz) or follow this [guide](https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins)

```yaml
resources:
url: /local/roku-card.js
type: module
```
## Usage

```yaml
Expand Down Expand Up @@ -128,6 +128,12 @@ volume_down:

[Troubleshooting](https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins)

## Developers

Fork and then clone the repo to your local machine. From the cloned directory run

`npm install && npm run build`

[commits-shield]: https://img.shields.io/github/commit-activity/y/iantrich/roku-card.svg?style=for-the-badge
[commits]: https://github.com/iantrich/roku-card/commits/master
[discord]: https://discord.gg/Qa5fW2R
Expand Down
4 changes: 4 additions & 0 deletions dist/roku-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -3035,10 +3035,14 @@ const actionHandler = directive((options = {}) => (part) => {
actionHandlerBind(part.committer.element, options);
});

const CARD_VERSION = '1.0.3';

const defaultRemoteAction = {
action: "call-service",
service: "remote.send_command"
};
/* eslint no-console: 0 */
console.info(`%c ROKU-CARD \n%c Version ${CARD_VERSION} `, 'color: orange; font-weight: bold; background: black', 'color: white; font-weight: bold; background: dimgray');
let RokuCard = class RokuCard extends LitElement {
getCardSize() {
return 7;
Expand Down
1 change: 1 addition & 0 deletions src/const.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const CARD_VERSION = '1.0.3';
8 changes: 8 additions & 0 deletions src/roku-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@ import {

import { RokuCardConfig } from "./types";
import { actionHandler } from "./action-handler-directive";
import { CARD_VERSION } from "./const";

const defaultRemoteAction = {
action: "call-service",
service: "remote.send_command"
};

/* eslint no-console: 0 */
console.info(
`%c ROKU-CARD \n%c Version ${CARD_VERSION} `,
'color: orange; font-weight: bold; background: black',
'color: white; font-weight: bold; background: dimgray',
);

@customElement("roku-card")
class RokuCard extends LitElement {
@property() public hass?: HomeAssistant;
Expand Down

0 comments on commit 8066fca

Please sign in to comment.