Macro| // Source activation macro for Sky Q - Bedroom! // SetActiveSource creates the following server variables! // activesource_sourceid_, activesource_source_, activesource_sourcename_! // activesource_image_, activesource_macro_, activesource_type_! // activeroom_! //! SetActiveSource|Sky Q - Bedroom! //! SetVariable|{{activeroom_{{clientname}}}}_source~{{activesource_sourcename_{{clientname}}}}! // Tell the driver what device is active! AV|{{{{activeroom_{{clientname}}}}_cabletv_id}}~SelectDevice! //! // This next section is for systems that utilize audio and video distribution via AV switchers! // If your system does not use this technology then you can ignore all of the following section! // The Audio and/or Video switcher inputs this source is on! // Uncomment and set if needed! // SetVariable|{{activeroom_{{clientname}}}}_audio_switcher_input~0! // SetVariable|{{activeroom_{{clientname}}}}_sonos_switcher_input~0! // SetVariable|{{activeroom_{{clientname}}}}_video_switcher_input~0! //! // Now do the switching if necessary! //! // If|isGT##{{{{activeroom_{{clientname}}}}_video_switcher_input}}##0##AV|{{{{activeroom_{{clientname}}}}_video_switcher_id}}~Source~{{{{activeroom_{{clientname}}}}_video_switcher_input}}! // If|isGT##{{{{activeroom_{{clientname}}}}_audio_switcher_input}}##0##AV|{{{{activeroom_{{clientname}}}}_audio_switcher_id}}~Source~{{{{activeroom_{{clientname}}}}_audio_switcher_input}}! // If|IsGT##{{{{activeroom_{{clientname}}}}_sonos_switcher_input}}##0##Sonos|{{{{activeroom_{{clientname}}}}_sonos_switcher_id}}~LineIn~{{{{activeroom_{{clientname}}}}_sonos_switcher_input}}! //! // Uncomment if you need to make sure the display is always looking at the correct source! // SetVariable|{{activeroom_{{clientname}}}}_display_input~HDMI! //! // Always Turn the display on if defined! If|isGT##{{{{activeroom_{{clientname}}}}_display_id}}##0##AV|{{{{activeroom_{{clientname}}}}_display_id}}~power~on! //! // Set display to specific source! If|isNE##{{{{activeroom_{{clientname}}}}_display_input}}####AV|{{{{activeroom_{{clientname}}}}_display_id}}~source~{{{{activeroom_{{clientname}}}}_display_input}}! //! // Finally everything is ready. Send the client to the appropriate page! //! LoadScene|cabletv! // fini