Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

524 flow line color not showing #593

Merged
merged 2 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions src/components/battery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,20 @@ export const batteryElement = (
})}
</span>`
: null}
<ha-icon
.icon=${battery.icon}
@click=${(e: { stopPropagation: () => void }) => {
main.openDetails(e, entities.battery?.state_of_charge!);
}}
@keyDown=${(e: { key: string; stopPropagation: () => void }) => {
if (e.key === "Enter") {
main.openDetails(e, entities.battery?.state_of_charge!);
}
}}
></ha-icon>
${battery.icon !== " "
? html` <ha-icon
id="battery-icon"
.icon=${battery.icon}
@click=${(e: { stopPropagation: () => void }) => {
main.openDetails(e, entities.battery?.state_of_charge!);
}}
@keyDown=${(e: { key: string; stopPropagation: () => void }) => {
if (e.key === "Enter") {
main.openDetails(e, entities.battery?.state_of_charge!);
}
}}
/>`
: null}
${entities.battery?.display_state === "two_way" ||
entities.battery?.display_state === undefined ||
(entities.battery?.display_state === "one_way_no_zero" && battery.state.toBattery > 0) ||
Expand Down
2 changes: 1 addition & 1 deletion src/components/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const gridElement = (
}}
>
${generalSecondarySpan(main.hass, main, config, templatesObj, grid, "grid")}
<ha-icon .icon=${grid.icon}></ha-icon>
${grid.icon !== " " ? html` <ha-icon id="grid-icon" .icon=${grid.icon} />` : null}
${(entities.grid?.display_state === "two_way" ||
entities.grid?.display_state === undefined ||
(entities.grid?.display_state === "one_way_no_zero" && (grid.state.toGrid ?? 0) > 0) ||
Expand Down
2 changes: 1 addition & 1 deletion src/components/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const homeElement = (
}}
>
${generalSecondarySpan(main.hass, main, config, templatesObj, home, "home")}
<ha-icon .icon=${home.icon}></ha-icon>
${home.icon !== " " ? html`<ha-icon id="home-icon" .icon=${home.icon} />` : null}
${homeUsageToDisplay}
<svg class="home-circle-sections">
${
Expand Down
2 changes: 1 addition & 1 deletion src/components/individualLeftBottomElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const individualLeftBottomElement = (
}}
>
${individualSecondarySpan(hass, main, config, templatesObj, individualObj, 1, "left-bottom")}
<ha-icon id="individual-left-bottom-icon" .icon=${individualObj?.icon}></ha-icon>
${individualObj?.icon !== " " ? html` <ha-icon id="individual-left-bottom-icon" .icon=${individualObj?.icon} />` : null}
${individualObj?.field?.display_zero_state !== false || (individualObj?.state || 0) > (individualObj.displayZeroTolerance ?? 0)
? html` <span class="individual-bottom individual-left-bottom"
>${individualObj?.showDirection
Expand Down
2 changes: 1 addition & 1 deletion src/components/individualLeftTopElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const individualLeftTopElement = (
}}
>
${individualSecondarySpan(main.hass, main, config, templatesObj, individualObj, 0, "left-top")}
<ha-icon id="individual-left-top-icon" .icon=${individualObj.icon}></ha-icon>
${individualObj.icon !== " " ? html` <ha-icon id="individual-left-top-icon" .icon=${individualObj.icon} />` : null}
${individualObj?.field?.display_zero_state !== false || (individualObj.state || 0) > (individualObj.displayZeroTolerance ?? 0)
? html` <span class="individual-top individual-left-top">
${individualObj?.showDirection
Expand Down
2 changes: 1 addition & 1 deletion src/components/individualRightBottomElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const individualRightBottomElement = (
}}
>
${individualSecondarySpan(main.hass, main, config, templatesObj, individualObj, 3, "right-bottom")}
<ha-icon id="individual-right-bottom-icon" .icon=${individualObj.icon}></ha-icon>
${individualObj.icon !== " " ? html` <ha-icon id="individual-right-bottom-icon" .icon=${individualObj.icon} />` : null}
${individualObj?.field?.display_zero_state !== false || (individualObj.state || 0) > (individualObj.displayZeroTolerance ?? 0)
? html` <span class="individual-bottom individual-right-bottom">
${individualObj?.showDirection
Expand Down
2 changes: 1 addition & 1 deletion src/components/individualRightTopElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const individualRightTopElement = (
}}
>
${individualSecondarySpan(main.hass, main, config, templatesObj, individualObj, 2, "right-top")}
<ha-icon id="individual-right-top-icon" .icon=${individualObj.icon}></ha-icon>
${individualObj.icon !== " " ? html` <ha-icon id="individual-right-top-icon" .icon=${individualObj.icon} />` : null}
${individualObj?.field?.display_zero_state !== false || (individualObj.state || 0) > (individualObj.displayZeroTolerance ?? 0)
? html` <span class="individual-top individual-right-top">
${individualObj?.showDirection
Expand Down
2 changes: 1 addition & 1 deletion src/components/nonFossil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const nonFossilElement = (
}}
>
${generalSecondarySpan(main.hass, main, config, templatesObj, nonFossil, "low-carbon")}
<ha-icon .icon=${nonFossil.icon} class="low-carbon"></ha-icon>
${nonFossil.icon !== " " ? html` <ha-icon id="low-carbon-icon" .icon=${nonFossil.icon} />` : null}
${entities.fossil_fuel_percentage?.display_zero_state !== false ||
(nonFossil.state.power || 0) > (entities.fossil_fuel_percentage?.display_zero_tolerance || 0)
? html`
Expand Down
2 changes: 1 addition & 1 deletion src/components/solar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const solarElement = (
}}
>
${generalSecondarySpan(main.hass, main, config, templatesObj, solar, "solar")}
<ha-icon id="solar-icon" .icon=${solar.icon}></ha-icon>
${solar.icon !== " " ? html` <ha-icon id="solar-icon" .icon=${solar.icon} />` : null}
${entities.solar?.display_zero_state !== false || (solar.state.total || 0) > 0
? html` <span class="solar">
${displayValue(main.hass, config, solar.state.total, {
Expand Down
2 changes: 1 addition & 1 deletion src/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export const styles = css`

.individual-top path,
.individual-top circle {
stroke: var(--icon-individual-left-top-color);
stroke: var(--individual-left-top-color);
}

#individual-left-bottom-icon {
Expand Down
Loading