Skip to content

Instantly share code, notes, and snippets.

View Isengo1989's full-sized avatar
🏠
Working from home

Micha Hobert Isengo1989

🏠
Working from home
View GitHub Profile
@Isengo1989
Isengo1989 / motion-illuminance.yaml
Created February 1, 2024 08:29 — forked from Danielbook/motion-illuminance.yaml
Motion and Illuminance level
blueprint:
name: Motion-activated Light with illuminance
description: Turn on a light when motion is detected and illuminance is below a set Lux level.
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
@Isengo1989
Isengo1989 / LoginSuccessHandler.php
Last active November 19, 2018 18:04 — forked from marydn/LoginSuccessHandler.php
Custom URL redirect by role after success login on Symfony 2 using a service listener without FOSUser Bundle.
# src/Security/LoginFormAuthenticator.php
<?php
namespace App\Security;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;