Skip to content

Commit

Permalink
Minor Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danimart1991 committed Apr 1, 2022
1 parent 77656d6 commit 0c26991
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# PVPC Hourly Pricing Card

![GitHub release (latest by date)](https://img.shields.io/github/v/release/danimart1991/pvpc-hourly-pricing-card)
![GitHub last commit](https://img.shields.io/github/last-commit/danimart1991/pvpc-hourly-pricing-card)
![License](https://img.shields.io/github/license/danimart1991/pvpc-hourly-pricing-card.svg)
Expand All @@ -6,8 +8,6 @@
[![Tip Me via PayPal](https://img.shields.io/badge/PayPal-tip%20me-blue.svg?logo=paypal&style=flat)](https://www.paypal.me/danimart1991)
[![Sponsor Me via GitHub](https://img.shields.io/badge/GitHub-sponsor%20me-blue.svg?logo=github&style=flat)](https://github.com/sponsors/danimart1991)

# PVPC Hourly Pricing Card

Home Assistant Lovelace custom card to use with [Spain electricity hourly pricing (PVPC) integration](https://www.home-assistant.io/integrations/pvpc_hourly_pricing/).

![Card Example](https://raw.githubusercontent.com/danimart1991/pvpc-hourly-pricing-card/master/docs/images/card-example.png)
Expand All @@ -31,7 +31,7 @@ You could use [HACS](https://hacs.xyz/) or follow this [guide](https://www.danie

```yaml
resources:
url: /local/pvpc-hourly-pricing-card.js?v=1.5.1
url: /local/pvpc-hourly-pricing-card.js?v=1.6.0
type: module
```
Expand Down Expand Up @@ -61,8 +61,8 @@ If this doesn't work, another option is to add it manually from your Lovelace Da

```yaml
type: custom:pvpc-hourly-pricing-card
name: "PVPC 2.0 DHA"
entity: sensor.pvpc_2_0_dha
name: "PVPC 2.0 DT"
entity: sensor.pvpc_2_0_dt
```

### Mode YAML
Expand All @@ -74,7 +74,7 @@ Add this lines of code to your Lovelace Dashboard YAML file:
cards:
...
- type: custom:pvpc-hourly-pricing-card
name: "PVPC 2.0 DHA"
entity: sensor.pvpc_2_0_dha
name: "PVPC 2.0 DT"
entity: sensor.pvpc_2_0_dt
...
```
4 changes: 2 additions & 2 deletions dist/pvpc-hourly-pricing-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class PVPCHourlyPricingCard extends LitElement {

static getStubConfig(hass, entities, entitiesFallback) {
const entity = Object.keys(hass.states).find((eid) =>
Object.keys(hass.states[eid].attributes).some((aid) => aid == 'min_price_at')
Object.keys(hass.states[eid].attributes).some((aid) => aid == 'attribution')
);
return { entity: entity };
}
Expand Down Expand Up @@ -781,7 +781,7 @@ export class PVPCHourlyPricingCardEditor extends LitElement {
this.lang = this.hass.selectedLanguage || this.hass.language;

const entities = Object.keys(this.hass.states).filter((eid) =>
Object.keys(this.hass.states[eid].attributes).some((aid) => aid == 'min_price_at')
Object.keys(this.hass.states[eid].attributes).some((aid) => aid == 'attribution')
);

return html`
Expand Down

0 comments on commit 0c26991

Please sign in to comment.