fix(deploy): self-diagnosing sha sensor + drop invalid not-key [#734]
Gitea response came back a dict (error body) - sensor state now shows the truncated body so one restart identifies it. not: rejected by trigger schema; guard lives in the condition template already. Detail: https://projects.knownelement.com/issues/734
This commit is contained in:
@@ -332,9 +332,6 @@
|
|||||||
triggers:
|
triggers:
|
||||||
- trigger: state
|
- trigger: state
|
||||||
entity_id: sensor.pfv_deploy_gitea_master_head
|
entity_id: sensor.pfv_deploy_gitea_master_head
|
||||||
not:
|
|
||||||
- unknown
|
|
||||||
- unavailable
|
|
||||||
conditions:
|
conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
|||||||
@@ -15,5 +15,5 @@ rest:
|
|||||||
sensor:
|
sensor:
|
||||||
- name: PFV deploy gitea master head
|
- name: PFV deploy gitea master head
|
||||||
unique_id: pfv_deploy_gitea_master_head
|
unique_id: pfv_deploy_gitea_master_head
|
||||||
availability: "{{ value_json is defined and value_json | length > 0 }}"
|
availability: "{{ value_json is defined and value_json is list and value_json | length > 0 }}"
|
||||||
value_template: "{{ value_json[0].sha }}"
|
value_template: "{{ value_json[0].sha if value_json is list and value_json | length > 0 else (value_json | string | truncate(90)) }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user