Dynamic Background

Not natively… However this should be possible with a template widget using dynamically loaded code; see examples linked in the “Advanced: Injecting custom JavaScript code” chapter of:

Some additional info:

  • The setting for the background image URL is in $rootScope.settings.background_image
  • You can inject OHService in the controller and then use this function to monitor for state changes of an item:
OHService.onUpdate($scope, <your_item_name>, function () {
    // your code here, for example:
    var item = OHService.getItem(<your_item_name>);
    $rootScope.settings.background_image = '/static/weather/bkg_' + item.state + '.jpg';
}
1 Like