import { h, Component } from 'preact'; import Script from './script/index.js'; export default class ScriptEditor extends Component { constructor() { super(); this.onChange = this.onChange.bind(this); this.sequenceChanged = this.sequenceChanged.bind(this); } onChange(ev) { this.props.onChange({ ...this.props.script, [ev.target.name]: ev.target.value, }); } sequenceChanged(sequence) { this.props.onChange({ ...this.props.script, sequence, }); } render({ script, isWide, hass }) { const { alias, sequence } = script; return (
{alias} Use scripts to execute a sequence of actions.
Sequence The sequence of actions of this script.

Learn more about available actions.