]> git.basschouten.com Git - openhab-addons.git/blob
53963fa8801bf1a923050ac623eb139dced54d5f
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.teleinfo.internal.handler.cbemm.evoicc;
14
15 import static org.openhab.binding.teleinfo.internal.TeleinfoBindingConstants.CHANNEL_CBEMM_EVOLUTION_ICC_PAPP;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.teleinfo.internal.dto.cbemm.evoicc.FrameCbemmEvolutionIcc;
19 import org.openhab.binding.teleinfo.internal.handler.cbemm.TeleinfoAbstractCbemmElectricityMeterHandler;
20 import org.openhab.core.library.types.QuantityType;
21 import org.openhab.core.library.unit.Units;
22 import org.openhab.core.thing.Thing;
23
24 /**
25  * The {@link TeleinfoAbstractCbemmEvoIccElectricityMeterHandler} class defines a skeleton for CBEMM Evolution ICC
26  * Electricity Meters
27  * handlers.
28  *
29  * @author Nicolas SIBERIL - Initial contribution
30  */
31 @NonNullByDefault
32 public abstract class TeleinfoAbstractCbemmEvoIccElectricityMeterHandler
33         extends TeleinfoAbstractCbemmElectricityMeterHandler {
34
35     public TeleinfoAbstractCbemmEvoIccElectricityMeterHandler(Thing thing) {
36         super(thing);
37     }
38
39     protected void updateStatesForCommonCbemmEvolutionIccChannels(FrameCbemmEvolutionIcc frame) {
40         updateStatesForCommonCbemmChannels(frame);
41         updateState(CHANNEL_CBEMM_EVOLUTION_ICC_PAPP, QuantityType.valueOf(frame.getPapp(), Units.VOLT_AMPERE));
42     }
43 }