Skip to content

Commit

Permalink
fix(#161): allow fractions in min_state & color_limit
Browse files Browse the repository at this point in the history
  • Loading branch information
MindFreeze committed Feb 25, 2024
1 parent ca099c1 commit a86e7a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rollup.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
serve({
contentBase: "./dist",
host: "0.0.0.0",
port: 5000,
port: 3000,
allowCrossOrigin: true,
headers: {
"Access-Control-Allow-Origin": "*",
Expand Down
2 changes: 1 addition & 1 deletion src/editor/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const computeSchema = (entityConf: EntityConfig, icon: string) => [
? [
{
name: 'color_limit',
selector: { number: { mode: 'box', unit_of_measurement: entityConf.unit_of_measurement } },
selector: { number: { mode: 'box', unit_of_measurement: entityConf.unit_of_measurement, min: 0., step: 'any' } },
},
{ name: 'color_above', selector: { text: {} } },
{ name: 'color_below', selector: { text: {} } },
Expand Down
2 changes: 1 addition & 1 deletion src/editor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class SankeyChartEditor extends LitElement implements LovelaceCardEditor
type: 'grid',
name: '',
schema: [
{ name: 'min_state', selector: { number: { mode: 'box' } } },
{ name: 'min_state', selector: { number: { mode: 'box', min: 0., step: 'any' } } },
{ name: 'static_scale', selector: { number: { mode: 'box' } } },
{ name: 'round', selector: { number: { mode: 'box', unit_of_measurement: localize('editor.decimals') } } },
{ name: 'throttle', selector: { number: { mode: 'box', unit_of_measurement: 'ms' } } },
Expand Down

0 comments on commit a86e7a4

Please sign in to comment.