Just modify the function to store the wanted_temp
value somewhere (for example in item._wanted_temp
) and if different than stored, invalidate the item._cached_thresholds
cache.
you are a good man. thankyou…
with your instructions i have changed the thresholds function and even give up on cache the function because it relay on old value of the temp. it working very well as i wanted to. thank you very much
thresholds: function(item, entity) {
const value = this.states['input_number.living_target_temp'].state;
if (item.old_val !== value) {
thresholds = {
[value - 10]: {
color: "magenta"
},
[value - 7]: {
color: "purple"
},
[value - 5]: {
color: "blue"
},
[value - 3]: {
color: "skyblue"
},
[value - 2]: {
color: "green"
},
[value + 1]: {
color: "yellowgreen"
},
[value + 2]: {
color: "yellow"
},
[value + 3]: {
color: "orange"
},
[value + 5]: {
color: "red"
},
[value + 7]: {
color: "firebrick"
},
[value + 10]: {
color: "maroon"
}
}
item.old_val = value;
}
return thresholds
},
Figured it out. In my case, I had to call a second action like this:
popup: {
tileSize: 150,
items: [
{
position: [0, 0],
type: TYPES.CUSTOM,
id: { },
icon: 'mdi-home',
title: 'Normaal',
state: false,
action: function(item, entity) {
this.apiRequest({
type: 'call_service',
domain: 'input_select',
service: 'select_option',
service_data: {
entity_id: 'input_select.housemode',
option: 'Normaal'
}
}),
this.$scope.closePopup();
},
},
Hope it helps
Help set the climate step to 0.5
Thanks, that partially covers it.
I ideally want to define
- an initial timeout of 10 seconds to close the popup if nothing is pressed
- once you press a button, it will auto close after say 2 seconds (in case you want to press another button on the same popup)
I tried substituting this.$scope.closePopup();
for this.$scope.popupTimeout = 2;
in your code snippit above in an attempt to achieve the second point however nothing happens.
tying to use this code snippit from #496
action: function (item, entity) {
this.$scope.entityClick({}, item, entity);
$timeout(function () {
this.$scope.closePopup();
}, shorter_timeout_in_millliseconds_to improve user experience);}
results in console error
ReferenceError: $timeout is not defined
Is there a way I can make the TV icon smaller. I want all the others to be big but I want the TV one much much smaller
my code is:
{
position: [5, -1.03],
width: 2,
height: 1,
type: TYPES.POPUP,
id: {},
icon: 'mdi-television',
title: 'Living Room TV',
state: false,
popup: {
tileSize: 100,
items: [
{
position: [1, 1],
type: TYPES.SCRIPT,
id: 'script.living_room_tv_play',
},
]
}
thanks!
width: 0.66,
height: 0.66,
Hi,
Thanks for that but that only makes the tile smaller and not the icon itself
hi guys, can anyone tell me in what file the style code for the Celsius is located?
i cant find it anywhere… its in the angular js file?
i will like to align to top the measure unit on gauge tiles
Can you share on how did you make Spotify work on TileBoard??
How do I get a tile like this?
in there are 6 tiles over each other. Only one have the background set
New boy here again.
I’m just trying our the Tileboard on a new Android device running 6.0, so should be ok.
Trouble is on Chrome, FireFox, or Kiosk Browser, I’m getting an “error whilst retrieving access token” message.
FF shows as net:: ERR_NAME_NOT_RESOLVED as a final message on a white screen Chrome just says site cannot be reached…
It doesnt happen if i log into the Lovelace/standard home assistant interface, and it doesnt happen on my IMac, Macbook Air, Ipad, IPhone, or RasberryPi, just this newish Acer Android tablet im trying to use.
Any clues?
Thanks
did you created a token for tileboard and put in the config.js file?
authToken:xxxxxx
That’s not a good suggestion because using a token is inherently unsafe for a public app like tile board. Unless it’s only used in local network i guess but there is still some risk.
Just logging using the home assistant login flow should work.
Maybe check if the server URL is correct and accessible.
No Token, as I havent needed to with the other devices that can connect without issue
Its accessible.
I can use, access, edit on my:
IPad, IMac, IPhone, RasberryPi, & my Wifes IPhone.
The two devices that don’t connect, or cannot would be more accurate, are my Acer 10" pad, and my daughters One plus 5 Phone, curiously both run Android, but different versions. It looks like they are trying to connect, but not waiting for the access to be granted, i.e. login and password…
I’m stumped.
Hi all,
I know this script is a bit over the place but I am hoping you can see what I am trying to do:
{
position: [5.32, -0.71],
type: TYPES.IMAGE,
id: 'script.living_room_tv_play',
title: '',
state: false,
url: 'images/tv/playpause.png', // Icon Image
width: 0.4,
height: 0.4,
hidden: function (item, entity) { return media_player.living_room_tv_kd_75x8500e.state == 'off' }
},
I want to show a title when my tv is on only. I want this tile to have the background ‘images/tv/playpause.png’ and I want it to run a script when the button is pressed.
As the media player tile doesnt work for my tv I decide to go a different route.
Can anyone help me? If I just do a TYPES.SCRIPT then I can’t get a background (I don’t want to use mdi-icons) and when I do TYPES.IMAGES then I can’t make it run the script.
Then there is also the matter of the tile only appearing when media_player.living_room_tv_kd_75x8500e STATE is set to ON.
Any help would be great.
Thank you in advance!
Hi, Did you solve this? Having the same issue.
I think you can trigger an API call with an:
action: function(item, entity) { this.$scope.callScript(item, entity) },
Maybe:
hidden: function (item, entity) { return this.states['media_player.living_room_tv_kd_75x8500e'].state == 'off' }