Open Didgeridrew opened 2 months ago
What exactly is the script error you are seeing?
I'm trying this but I don't see any errors, don't see any problem with having empty brackets there.
alias: Entity Selector
sequence:
- action: logbook.log
metadata: {}
data:
message: Test Message
name: test
fields:
example:
selector:
entity: {}
name: Example
description: Example Description
description: ""
@Didgeridrew check again is the issue still persisting, if yes I would like to contribute.
What exactly is the script error you are seeing?
The script setup fails with the following:
The script "zTest data field" (script.ztest_data_field) is not active because the configuration has errors.
Error:Only one type can be specified. Found for dictionary value @ data['fields']['testent']['selector']. Got OrderedDict().
To fix this error, [edit the script](https://johns*****.***/config/script/edit/ztest_data_field) to correct it, then save and reload the script configuration.
And the system logs show:
Logger: homeassistant.components.script
Source: components/script/config.py:147
integration: Script (documentation, issues)
First occurred: 11:50:31 PM (1 occurrences)
Last logged: 11:50:31 PM
Script with alias 'zTest data field' could not be validated and has been disabled: Only one type can be specified. Found for dictionary value @ data['fields']['testent']['selector']. Got OrderedDict()
Updated to 2024.9.2, and the issue persists.
Can you post the entire complete script that has this error (yaml not screenshot?)
alias: zTest data field
sequence:
- action: persistent_notification.create
metadata: {}
data:
message: "{{testent}}"
title: This is a Test
fields:
testent:
selector:
entity: {}
name: TestEnt
description: ""
Hmm strange that works perfectly for me. It says the same in safe mode?
Yes, I get the same repair message and error in the system log in Safe Mode.
Hm sorry I'm stumped then, can't reproduce. 🤷
Checklist
Describe the issue you are experiencing
When adding Fields using the Visual Editor for Script, an
{}
is inserted after the selector type key instead ofnull
.Example:
This causes the script to error and become unavailable. Many Selector types require further configuration using the YAML editor, but some do not require it and a few do not have any options beyond their key, so switching the the YAML editor to delete the
{}
should not be required.Describe the behavior you expected
If additional configuration is not required by the Selector, just choosing the selector type should be sufficient to have a working field variable.
Steps to reproduce the issue
What version of Home Assistant Core has the issue?
2024.9.1
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Firefox 130.0, Google Chrome 128.0.6613.137
Which operating system are you using to run this browser?
Pop!_OS 22.04 LTS
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
No response