Hallo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blueprint: | |
| name: Switch disable motion | |
| domain: automation | |
| description: Zet een switch uit bij geselecteerde Hue device-triggers. | |
| input: | |
| hue_triggers: | |
| name: Hue triggers | |
| description: Voeg per device de gewenste knop-actie toe. | |
| default: [] | |
| selector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blueprint: | |
| name: Motion-activated Multiple Scenes (multi motion) | |
| domain: automation | |
| input: | |
| motion_entity: | |
| name: Motion Sensors (meerdere) | |
| selector: | |
| entity: | |
| multiple: true | |
| domain: binary_sensor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val query = """select * from members where name = "Ben;\"; select id from countries""" | |
| query | |
| .split(""";(?=([^\"]*\"[^\"]*\")*[^\"]*$)""") | |
| .map(_.trim) | |
| .toList |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val query = """select * from members where name = "Ben;\"; select id from countries""" | |
| // Functional way | |
| query | |
| .split('"') | |
| .toList | |
| .sliding(2,2) | |
| .map{case hd :: tl => hd.split(';').filter(_.nonEmpty) ++ tl}.toList | |
| .map(line => { | |
| line |