Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- crypto_value:
- show_icon: false
- show_state: false
- show_name: false
- styles:
- grid:
- - grid-template-areas: '"title CRYPTO CRYPTO_u" "title USD USD_u" "title PLN PLN_u"'
- - grid-template-columns: 1fr auto auto
- custom_fields:
- title:
- - font-size: 1.5em
- - align-self: middle
- - justify-self: start
- - margin-left: 20px
- CRYPTO:
- - font-size: 1.2em
- - padding: 2px
- - align-self: middle
- - justify-self: end
- - margin-right: 2px
- USD:
- - font-size: 0.8em
- - padding: 1px
- - align-self: middle
- - justify-self: end
- - margin-right: 2px
- PLN:
- - font-size: 0.8em
- - padding: 1px
- - align-self: middle
- - justify-self: end
- - margin-right: 2px
- CRYPTO_u:
- - font-size: 0.9em
- - padding: 2px
- - align-self: end
- - justify-self: start
- - margin-right: 10px
- - color: var(--secondary-text-color)
- USD_u:
- - font-size: 0.6em
- - padding: 1px
- - align-self: end
- - justify-self: start
- - margin-right: 10px
- - color: var(--secondary-text-color)
- PLN_u:
- - font-size: 0.6em
- - padding: 1px
- - align-self: end
- - justify-self: start
- - margin-right: 10px
- - color: var(--secondary-text-color)
- variables:
- icon: mdi:cash
- title: TITLE
- round: 2
- USD_price_entity: sensor.step_price
- PLN_price_entity: sensor.pln_price
- unit_of_measurement: '[[[ return entity.attributes.unit_of_measurement ]]]'
- custom_fields:
- title: >-
- [[[ return `<ha-icon icon="${variables.icon}" style="height: 1.5em;
- color: var(--state-icon-color); "></ha-icon> ${variables.title}` ]]]
- CRYPTO: '[[[ return parseFloat(entity.state).toFixed(variables.round) ]]]'
- USD: >-
- [[[ return parseFloat(entity.state *
- states[variables.USD_price_entity].state).toFixed(2) ]]]
- PLN: >-
- [[[ return parseFloat(entity.state *
- states[variables.USD_price_entity].state *
- states[variables.PLN_price_entity].state).toFixed(2) ]]]
- CRYPTO_u: '[[[ return variables.unit_of_measurement ]]]'
- USD_u: USD
- PLN_u: PLN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement