Update Energy Package

This commit is contained in:
2022-09-04 08:09:41 -07:00
parent 86bfdef296
commit 7ede540ae8
2 changed files with 16 additions and 12 deletions

View File

@@ -36,12 +36,14 @@ sensor:
- name: Flex Alert RSS - name: Flex Alert RSS
platform: rest platform: rest
resource: 'http://content.caiso.com/awe/noticeflexRSS.xml' resource: 'http://content.caiso.com/awe/noticeflexRSS.xml'
value_template: > value_tempalte: >
( {{
state_attr('sensor.flex_alert_rss', 'item') (
| selectattr('title', 'search', 'NOTICE') value_json['rss']['channel']['item']
| list | selectattr('title', 'search', 'NOTICE')
)[0]['title'] | list
)[0]['title']
}}
json_attributes_path: '$.rss.channel' json_attributes_path: '$.rss.channel'
json_attributes: json_attributes:
- item - item

View File

@@ -36,12 +36,14 @@ sensor:
- name: Flex Alert RSS - name: Flex Alert RSS
platform: rest platform: rest
resource: 'http://content.caiso.com/awe/noticeflexRSS.xml' resource: 'http://content.caiso.com/awe/noticeflexRSS.xml'
value_template: > value_tempalte: >
( {{
state_attr('sensor.flex_alert_rss', 'item') (
| selectattr('title', 'search', 'NOTICE') value_json['rss']['channel']['item']
| list | selectattr('title', 'search', 'NOTICE')
)[0]['title'] | list
)[0]['title']
}}
json_attributes_path: '$.rss.channel' json_attributes_path: '$.rss.channel'
json_attributes: json_attributes:
- item - item