Spelling. Loops notation (#1626)

* Spelling. Loops notation

Corrected error in spelling of fragments (from fragements).

Changed notation of state of item in a loop to: items[loop.item.name].state (was loop.item.state).
This will ensure items update state with state changes.

Signed-off-by: fringefilmsoz <fringefilmsoz@gmail.com>
pull/1677/head
fringefilmsoz 2021-11-27 01:37:34 +10:00 committed by GitHub
parent c2d43c5a61
commit f9cc24262c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -372,7 +372,7 @@ slots:
default:
- component: oh-repeater
config:
fragement: true
fragment: true
for: item
sourceType: itemsWithTags
itemTags: Switch,Light
@ -382,8 +382,8 @@ slots:
- component: oh-toggle-item
config:
icon: f7:lightbulb
iconColor: '=(loop.item.state == "ON") ? "yellow" : "gray"'
color: '=(loop.item.state == "ON") ? "yellow" : "gray"'
iconColor: '=(items[loop.item.name].state == "ON") ? "yellow" : "gray"'
color: '=(items[loop.item.name].state == "ON") ? "yellow" : "gray"'
title: =loop.item.label
item: =loop.item.name
```