Update Energy Package

This commit is contained in:
2022-09-04 08:06:29 -07:00
parent 0160866a94
commit 86bfdef296
2 changed files with 12 additions and 2 deletions

View File

@@ -36,7 +36,12 @@ 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_json['rss']['channel']['item'][0]['title']|trim }}" value_template: >
(
state_attr('sensor.flex_alert_rss', 'item')
| selectattr('title', 'search', 'NOTICE')
| list
)[0]['title']
json_attributes_path: '$.rss.channel' json_attributes_path: '$.rss.channel'
json_attributes: json_attributes:
- item - item

View File

@@ -36,7 +36,12 @@ 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_template: >
(
state_attr('sensor.flex_alert_rss', 'item')
| selectattr('title', 'search', 'NOTICE')
| list
)[0]['title']
json_attributes_path: '$.rss.channel' json_attributes_path: '$.rss.channel'
json_attributes: json_attributes:
- item - item