TileBoard - New dashboard for Homeassistant

You have forgotten to add unit: 'min' to each list item to display “min”, as for formatting, we have filter which be defined as a function:

filter: function (value) {return Math.round(value)},

Please read through our README and Wiki for more information.

hi,

i tried the math.round approach as well but it didnt help. the formatting of the duration number stays the same…

i applied as follows:

title: ‘Home to Airport’,
icon: ‘mdi-airplane’,
value: ‘&sensor.home_to_airport.attributes.duration’,
filter: function (value) {return Math.round(value)},
unit: ‘min’

the unit topic has been fixed though.

How about this:

            value: function () {
                  return Math.round(this.states['home_to_airport'].attributes.duration);
            },            

using your approach ended up only returning “min” and not showing any number at all.

the code now looks as follows:

title: 'Home to Airport',
icon: 'mdi-airplane',
value: function () {return Math.round(this.states['home_to_airport'].attributes.duration);},
unit: 'min'

Sorry, I made a mistake since I’m typing from my phone:

            value: function () {
                  return Math.round(this.states['sensor.home_to_airport'].attributes.duration);
            }, 
1 Like

your phone skills were good enough :grinning:

it now works. thanks a lot!

1 Like

If I’m not mistaken, this could also work like this:

            value: function (value) {
                  return Math.round(value);
            }, 

Can you share that background image?

To save some screen estate, I’d like to configure a sensor tile that switches between temperature and humidity. Or between the temperature of two different sensors.

Is this possible?

You can have temperature as a value and humidity as state (top right).

1 Like

1 Like

Thanks, @resoai. This seems to be a decent workaround for what I am trying to achieve, yet a tile that slides between the different views would be visually more appealing to me. Plus, you wouldn’t be limited to just two different things. Any chance you might consider this in the future? :wink:

In all fairness, humidity is secondary data and state is the perfect place for it. I’m not sure we need to complicate things with the reverse side of the tiles as this would make things even more complicated for people. You could probably use the anonymous function with timeout and swap between two values in the sensor.

Hi Nilskilz,

how did you realize the time and date info on the top right corner of your screenshot? i need exactly the same…

1 Like

I edited the index.html and css manually for that.
However, I believe the projects been updated and you can now do this in the config…

Have a look here

1 Like

Is it possible to only show the status of an input boolean and not toggle it?

			      {
					 position: [1, 2],
					 width: 1,
					 type: TYPES.SENSOR_ICON,
					 title: 'Laundry',
					 classes: [CLASS_BIG],
					 type: TYPES.INPUT_BOOLEAN,
					 id: 'input_boolean.laundry',
					 states: {
					 on: "On",
					 off: "Off",
					 },
					 icons: {
						 on: 'mdi-washing-machine',
						 off: 'mdi-washing-machine',
					 },
				  },

You have type: TYPES.INPUT_BOOLEAN and type: TYPES.SENSOR_ICON set currently.

If you use TYPES.SENSOR or TYPES.SENSOR_ICON it should show the value without toggling it on click.

Thanks! That should work

Is it possible to show/hide pages and/or tiles and/or groups based on automations/states from home assistant?